Drop Project Security Manager

Used by Drop Project to create a sandbox for students submissions

License

License

Categories

Categories

Security
GroupId

GroupId

pt.ulusofona.deisi
ArtifactId

ArtifactId

drop-project-security-manager
Last Version

Last Version

0.1.1
Release Date

Release Date

Type

Type

jar
Description

Description

Drop Project Security Manager
Used by Drop Project to create a sandbox for students submissions
Project URL

Project URL

https://github.com/drop-project-edu/sandbox-security-manager
Source Code Management

Source Code Management

https://github.com/drop-project-edu/sandbox-security-manager

Download drop-project-security-manager

How to add to project

<!-- https://jarcasting.com/artifacts/pt.ulusofona.deisi/drop-project-security-manager/ -->
<dependency>
    <groupId>pt.ulusofona.deisi</groupId>
    <artifactId>drop-project-security-manager</artifactId>
    <version>0.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/pt.ulusofona.deisi/drop-project-security-manager/
implementation 'pt.ulusofona.deisi:drop-project-security-manager:0.1.1'
// https://jarcasting.com/artifacts/pt.ulusofona.deisi/drop-project-security-manager/
implementation ("pt.ulusofona.deisi:drop-project-security-manager:0.1.1")
'pt.ulusofona.deisi:drop-project-security-manager:jar:0.1.1'
<dependency org="pt.ulusofona.deisi" name="drop-project-security-manager" rev="0.1.1">
  <artifact name="drop-project-security-manager" type="jar" />
</dependency>
@Grapes(
@Grab(group='pt.ulusofona.deisi', module='drop-project-security-manager', version='0.1.1')
)
libraryDependencies += "pt.ulusofona.deisi" % "drop-project-security-manager" % "0.1.1"
[pt.ulusofona.deisi/drop-project-security-manager "0.1.1"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

Drop Project Security Manager

Custom Security Manager used by Drop Project to sandbox students' submissions.

Current checks include:

  • Calling System.exit()
  • Trying to read a file outside the working dir (or one of its subdirs)
  • Trying to write a file outside the working dir (or one of its subdirs)

Any of these will be detected by the Security Manager and will lead to a SecurityException being thrown.

How to use

Include the following dependency on your pom file:

<dependency>
    <groupId>pt.ulusofona.deisi</groupId>
    <artifactId>drop-project-security-manager</artifactId>
    <version>0.1.1</version>
</dependency>

Now, just set the security manager when calling your application like this:

java -Djava.security.manager=org.dropProject.security.SandboxSecurityManager YourMainClass
pt.ulusofona.deisi

Versions

Version
0.1.1
0.1.0