Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8a7fbd6
refactored features/ru.agentlab.security.feature/pom.xml
DmitryZagr Apr 22, 2020
21cff5e
test support
DmitryZagr Apr 22, 2020
e6e98cf
test support
DmitryZagr Apr 22, 2020
f1572c3
passed tests
DmitryZagr Apr 23, 2020
b85ab6a
added mockito
DmitryZagr Apr 25, 2020
20b0bc4
mock wso2
DmitryZagr Apr 26, 2020
343f2d1
added tests of IJwtService
DmitryZagr Apr 26, 2020
43b6a21
added ISecurityService tests
DmitryZagr Apr 26, 2020
5eeabc1
fixed device flow
DmitryZagr Apr 26, 2020
615facb
configure IAuthServerProvider via system properties
DmitryZagr Apr 27, 2020
1e3011f
added tests
DmitryZagr Apr 27, 2020
50f20eb
refactored TokenPayload
DmitryZagr Apr 28, 2020
59742eb
added tests
DmitryZagr Apr 28, 2020
64b280e
added mock of refreshToken request
DmitryZagr Apr 29, 2020
65e937f
updated nimbus sdk 6.23 -> 8.1
DmitryZagr May 3, 2020
8889463
removed javax.mail-api from dependencies
DmitryZagr May 3, 2020
408faa6
refactored cookies
DmitryZagr May 3, 2020
1fd0450
added refreshTokenTests
DmitryZagr May 3, 2020
0afb345
added refresh token tests
DmitryZagr May 3, 2020
c2fb849
userInfo tests
DmitryZagr May 3, 2020
03b7d2f
added codeflow tests
DmitryZagr May 3, 2020
afea266
fixed typo
DmitryZagr May 3, 2020
2c68a61
added device flow tests
DmitryZagr May 6, 2020
13996e0
added revoke token test
DmitryZagr May 8, 2020
9759dda
added system properties
DmitryZagr May 8, 2020
c39e469
Merge branch 'master' into oauth
DmitryZagr May 8, 2020
728512d
added docs
DmitryZagr May 8, 2020
3e689bb
Merge branch 'master' into oauth
DmitryZagr May 9, 2020
1cf52eb
edited maven build script for GitHub
DmitryZagr May 9, 2020
5d450a5
fixed Readme
DmitryZagr May 9, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
with:
java-version: 11
- name: Build with Maven
run: mvn -B clean package --file pom.xml
run: mvn -B clean install --file pom.xml
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,19 @@ Or you colud install sub-features one by one:

* `./bin/karaf debug` -- allows to attach with debugger on 5005 port

## Settings

| System property | ENV | Default value |
|:------------------------------------------------------:|:---------------------------------:|:------------------------------:|
| ru.agentlab.security.oauth.cookie.path | OAUTH_COOKIE_PATH | "/" |
| ru.agentlab.security.oauth.cookie.domain | OAUTH_COOKIE_DOMAIN | null |
| ru.agentlab.security.oauth.cookie.expire.access_token | OAUTH_COOKIE_EXPIRE_ACCESS_TOKEN | 3600 |
| ru.agentlab.security.oauth.cookie.expire.refresh_token | OAUTH_COOKIE_EXPIRE_REFRESH_TOKEN | 86400 |
| ru.agentlab.oauth.client.id | OAUTH_CLIENT_ID | "Ynio_EuYVk8j2gn_6nUbIVQbj_Aa" |
| ru.agentlab.oauth.client.secret | OAUTH_CLIENT_SECRET | "fTJGvvfJjUkWvn8R_NY8zXSyYQ0a" |
| | | |
| ru.agentlab.wso2.protocol | WSO2_PROTOCOL | "https" |
| ru.agentlab.wso2.host | WSO2_HOST | "localhost" |
| ru.agentlab.wso2.port | WSO2_PORT | 9443 |
| ru.agentlab.wso2.prefix | WSO2_PREFIX | "" |
| ru.agentlab.ssl.verification.enabled | SSL_VERIFICATION_ENABLED | false |
2 changes: 0 additions & 2 deletions features/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
<relativePath>../pom.xml</relativePath>
</parent>

<!-- <groupId>ru.agentlab</groupId> -->
<artifactId>ru.agentlab.security.features</artifactId>
<!-- <version>0.0.1-SNAPSHOT</version> -->
<name>AgentLab :: REST :: SECURITY :: FEATURES</name>
<packaging>pom</packaging>

Expand Down
132 changes: 63 additions & 69 deletions features/ru.agentlab.security.feature/pom.xml
Original file line number Diff line number Diff line change
@@ -1,74 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<!-- Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with this
work for additional information regarding copyright ownership. The ASF licenses
this file to You under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You may obtain
a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, either express or implied. See the License for
the specific language governing permissions and limitations under the License. -->

<modelVersion>4.0.0</modelVersion>

<parent>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<!-- Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with this
work for additional information regarding copyright ownership. The ASF licenses
this file to You under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You may obtain
a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, either express or implied. See the License for
the specific language governing permissions and limitations under the License. -->
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ru.agentlab.security</groupId>
<artifactId>ru.agentlab.security.features</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>ru.agentlab.security.feature</artifactId>
<name>AgentLab :: REST :: SECURITY :: FEATURES :: Feature</name>
<packaging>pom</packaging>

<build>
<resources>
<resource>
<directory>src/main/feature</directory>
<filtering>true</filtering>
<targetPath>${project.build.directory}/feature</targetPath>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>target/feature/feature.xml</file>
<type>xml</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<version>0.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>ru.agentlab.security.feature</artifactId>
<name>AgentLab :: REST :: SECURITY :: FEATURES :: Feature</name>
<packaging>pom</packaging>
<build>
<resources>
<resource>
<directory>src/main/feature</directory>
<filtering>true</filtering>
<targetPath>${project.build.directory}/feature</targetPath>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>target/feature/feature.xml</file>
<type>xml</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@

<bundle dependency="true">mvn:com.nimbusds/oauth2-oidc-sdk/${oauth2-oidc-sdk.version} </bundle>
<bundle dependency="true">mvn:com.nimbusds/lang-tag/${com.nimbusds.lang-tag.version} </bundle>
<bundle dependency="true">mvn:javax.mail/javax.mail-api/${javax.mail-api.version} </bundle>
<bundle dependency="true">mvn:com.nimbusds/content-type/${com.nimbusds.content-type.version} </bundle>
</feature>

<feature version="${project.version}" name="ru.agentlab.security.deps">
<feature prerequisite="true" dependency="false">wrap</feature>
<feature>http-whiteboard</feature>
<feature>aries-jax-rs-whiteboard</feature>
<feature>aries-jax-rs-whiteboard-jackson</feature>
Expand All @@ -63,7 +64,8 @@

<bundle dependency="true">mvn:org.apache.shiro/shiro-core/${shiro-core.version} </bundle>

<bundle dependency="true">mvn:org.slf4j/slf4j-api/${sl4j.version} </bundle>
<bundle dependency="true">mvn:ch.qos.logback/logback-core/${logback.version}</bundle>
<bundle dependency="true">mvn:ch.qos.logback/logback-classic/${logback.version}</bundle>

<bundle dependency="true">mvn:javax.servlet/javax.servlet-api/${javax.servlet-api.version} </bundle>

Expand Down
30 changes: 15 additions & 15 deletions plugins/.project
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>plugins</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
<name>plugins</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
10 changes: 1 addition & 9 deletions plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<!-- Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with this
work for additional information regarding copyright ownership. The ASF licenses
Expand All @@ -13,22 +12,16 @@
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, either express or implied. See the License for
the specific language governing permissions and limitations under the License. -->

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>ru.agentlab.security</groupId>
<artifactId>ru.agentlab.security.parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<!-- <groupId>ru.agentlab</groupId> -->
<artifactId>ru.agentlab.security.plugins</artifactId>
<!-- <version>0.0.1-SNAPSHOT</version> -->
<name>AgentLab :: REST :: SECURITY :: PLUGINS</name>
<packaging>pom</packaging>

<modules>
<module>ru.agentlab.security.example</module>
<module>ru.agentlab.security.cors</module>
Expand All @@ -37,5 +30,4 @@
<module>ru.agentlab.security.oauth.commons</module>
<module>ru.agentlab.security.security</module>
</modules>

</project>
</project>
13 changes: 2 additions & 11 deletions plugins/ru.agentlab.security.cors/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<!-- Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with this
work for additional information regarding copyright ownership. The ASF licenses
Expand All @@ -13,21 +12,16 @@
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, either express or implied. See the License for
the specific language governing permissions and limitations under the License. -->

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>ru.agentlab.security</groupId>
<artifactId>ru.agentlab.security.plugins</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>ru.agentlab.security.cors</artifactId>
<name>AgentLab :: REST :: SECURITY :: PLUGINS :: CORS</name>
<packaging>bundle</packaging>


<dependencies>
<dependency>
<groupId>org.osgi</groupId>
Expand All @@ -41,7 +35,6 @@
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
Expand All @@ -50,13 +43,11 @@
<version>${felix.plugin.version}</version>
<configuration>
<instructions>
<Import-Package>
*
<Import-Package> *
</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>

</project>
</project>
13 changes: 1 addition & 12 deletions plugins/ru.agentlab.security.example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<!-- Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with this
work for additional information regarding copyright ownership. The ASF licenses
Expand All @@ -13,23 +12,16 @@
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, either express or implied. See the License for
the specific language governing permissions and limitations under the License. -->

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>ru.agentlab.security</groupId>
<artifactId>ru.agentlab.security.plugins</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>


<artifactId>ru.agentlab.security.example</artifactId>
<name>AgentLab :: REST :: SECURITY :: PLUGINS :: EXAMPLE</name>

<packaging>bundle</packaging>


<dependencies>
<dependency>
<groupId>org.osgi</groupId>
Expand All @@ -43,7 +35,6 @@
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
Expand All @@ -52,13 +43,11 @@
<version>${felix.plugin.version}</version>
<configuration>
<instructions>
<Import-Package>
*
<Import-Package> *
</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>

</project>
Loading