diff --git a/configurations/default.ttl b/configurations/default.ttl index 14dc1741..ce3868c3 100644 --- a/configurations/default.ttl +++ b/configurations/default.ttl @@ -1,21 +1,33 @@ @prefix owl: . +@prefix rdfs: . @prefix models: . +@prefix acl: . +@prefix user: . +@prefix group: . +@prefix auth: . +@prefix foaf: . -<> a owl:Ontology ; owl:imports . +# import definition of administrators group +<> owl:imports . - a models:MemoryModelSet ; +# Define default admin user +user:admin a foaf:Agent ; auth:password "admin" . + +# add admin user to administrators group +group:Administrators foaf:member user:admin . + +# allow anonymous users full access to all models + a acl:Authorization ; acl:agent user:anonymous ; + acl:accessToClass ; + acl:mode acl:Read, acl:Write, acl:Control . + + a models:KvinMemoryModelSet ; models:inference false . -# a models:PersistentModelSet ; -# models:inference false ; +# a models:PersistentModelSet ; +# models:inference false ; # models:repository . -@base . -<> ; - [ "eniLINK" ; rdfs:label "eniLINK" ] . - -# @base . -# <> [ -# ; -# [ "DUMMY" ; rdfs:label "Test" ], [ "OpenID" ; rdfs:label "OpenID" ] -# ] . \ No newline at end of file +@prefix login: . +login: login:jaasConfigUrl ; + login:loginModule [ login:jaasConfigName "LinkedFactory-POD" ; rdfs:label "LinkedFactory-POD" ] . \ No newline at end of file diff --git a/configurations/jaas.conf b/configurations/jaas.conf new file mode 100644 index 00000000..a41b14f5 --- /dev/null +++ b/configurations/jaas.conf @@ -0,0 +1,5 @@ +LinkedFactory-POD { + org.eclipse.equinox.security.auth.module.ExtensionLoginModule required + extensionId="net.enilink.platform.core.EnilinkLoginModule" + mode="standalone"; +}; \ No newline at end of file diff --git a/launch/equinox/pom.xml b/launch/equinox/pom.xml index dbbc3821..72f87d17 100644 --- a/launch/equinox/pom.xml +++ b/launch/equinox/pom.xml @@ -41,10 +41,10 @@ -noExit - + org.osgi.service.http.port 8080 diff --git a/server/src/main/resources/deploy/jaas-karaf-1.1.0.xml b/server/src/main/resources/deploy/jaas-karaf-1.1.0.xml new file mode 100644 index 00000000..871b6350 --- /dev/null +++ b/server/src/main/resources/deploy/jaas-karaf-1.1.0.xml @@ -0,0 +1,11 @@ + + + + + extensionId = net.enilink.platform.core.EnilinkLoginModule + mode = standalone + + + \ No newline at end of file diff --git a/server/src/main/resources/workspace/config.ttl b/server/src/main/resources/workspace/config.ttl new file mode 100644 index 00000000..2a62ecf1 --- /dev/null +++ b/server/src/main/resources/workspace/config.ttl @@ -0,0 +1,32 @@ +@prefix owl: . +@prefix rdfs: . +@prefix models: . +@prefix acl: . +@prefix user: . +@prefix group: . +@prefix auth: . +@prefix foaf: . + +# import definition of administrators group +<> owl:imports . + +# Define default admin user +user:admin a foaf:Agent ; auth:password "admin" . + +# add admin user to administrators group +group:Administrators foaf:member user:admin . + +# allow anonymous users full access to all models + a acl:Authorization ; acl:agent user:anonymous ; + acl:accessToClass ; + acl:mode acl:Read, acl:Write, acl:Control . + + a models:KvinMemoryModelSet ; + models:inference false . + +# a models:PersistentModelSet ; +# models:inference false ; +# models:repository . + +@prefix login: . +login: login:loginModule [ login:jaasConfigName "LinkedFactory-POD" ; rdfs:label "LinkedFactory-POD" ] . \ No newline at end of file