From 2cd701bf31fd7401affe1660da875042e8e26cee Mon Sep 17 00:00:00 2001 From: Juraj Veverka Date: Sat, 19 Jun 2021 07:54:38 +0200 Subject: [PATCH] creating release 2.5.6 --- README.md | 2 +- docker-compose.yml | 8 +++--- .../01a-standalone-server-config.md | 16 +++++------ .../02c-manage-organization-and-projects.md | 8 +++--- .../iam-service-deployment.yml | 2 +- iam-commons/iam-client-spring/README.md | 4 +-- iam-commons/iam-client-spring/build.gradle | 2 +- iam-commons/iam-client/README.md | 4 +-- iam-commons/iam-client/build.gradle | 2 +- iam-commons/iam-core/build.gradle | 2 +- .../iamservice/core/utils/ModelUtils.java | 2 +- iam-commons/iam-model/build.gradle | 2 +- .../iamservice/core/dto/BuildInfo.java | 27 +++++++++++++++++-- iam-commons/iam-service-client/README.md | 4 +-- iam-commons/iam-service-client/build.gradle | 2 +- iam-examples/integration-tests/build.gradle | 2 +- iam-examples/performance-testing/build.gradle | 2 +- .../spring-method-security/Dockerfile | 2 +- iam-examples/spring-method-security/README.md | 8 +++--- .../spring-method-security/build.gradle | 2 +- .../spring-method-security/start-service.sh | 2 +- .../spring-resource-server/Dockerfile | 2 +- iam-examples/spring-resource-server/README.md | 8 +++--- .../spring-resource-server/build.gradle | 2 +- .../spring-resource-server/start-service.sh | 2 +- .../spring-webflux-secured/Dockerfile | 2 +- .../spring-webflux-secured/build.gradle | 2 +- .../spring-webflux-secured/start-service.sh | 2 +- iam-persistence/iam-caches-redis/build.gradle | 2 +- .../iam-persistence-file-system/build.gradle | 2 +- .../iam-persistence-mongo/build.gradle | 2 +- iam-service/Dockerfile | 3 ++- iam-service/README.md | 26 +++++++++--------- iam-service/build.gradle | 2 +- iam-service/iam-service-start.sh | 4 +-- .../iamservice/server/config/ModelConfig.java | 3 +++ .../controller/DiscoveryController.java | 12 +++++++-- release/Dockerfile | 3 ++- release/README-release.md | 10 +++---- release/RELEASE-CHECKLIST.md | 14 +++++----- release/RELEASE-NOTES.md | 8 +++--- release/create-release.sh | 2 +- release/docker-create-image.sh | 2 +- release/version-upgrade.sh | 4 +-- 44 files changed, 130 insertions(+), 94 deletions(-) diff --git a/README.md b/README.md index e5fbee9c..72dcfa74 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ and [OAuth2](https://tools.ietf.org/html/rfc6749) and [other](https://github.com * Please check [__User's Guide__](docs/IAM-user-manual/README.md) and [__Examples__](iam-examples) for more details. * Check [__Docker Hub releases__](https://hub.docker.com/r/jurajveverka/iam-service). ``` - docker run -d -p 8080:8080 jurajveverka/iam-service:2.5.5-RELEASE + docker run -d -p 8080:8080 jurajveverka/iam-service:2.5.6-RELEASE curl 'http://localhost:8080/services/discovery' curl 'http://localhost:8080/services/oauth2/iam-admins/iam-admins/.well-known/openid-configuration' ``` diff --git a/docker-compose.yml b/docker-compose.yml index a58bf9de..35ffec0c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3' services: iam-service: - image: iam-service:2.5.5-RELEASE + image: iam-service:2.5.6-RELEASE build: context: iam-service dockerfile: Dockerfile @@ -9,7 +9,7 @@ services: #ports: # - "8080:8080" spring-method-security: - image: spring-method-security:2.5.5-RELEASE + image: spring-method-security:2.5.6-RELEASE build: context: iam-examples/spring-method-security dockerfile: Dockerfile @@ -19,7 +19,7 @@ services: depends_on: - iam-service spring-resource-server: - image: spring-resource-server:2.5.5-RELEASE + image: spring-resource-server:2.5.6-RELEASE build: context: iam-examples/spring-resource-server dockerfile: Dockerfile @@ -29,7 +29,7 @@ services: depends_on: - iam-service spring-webflux-secured: - image: spring-webflux-secured:2.5.5-RELEASE + image: spring-webflux-secured:2.5.6-RELEASE build: context: iam-examples/spring-webflux-secured dockerfile: Dockerfile diff --git a/docs/IAM-user-manual/01a-standalone-server-config.md b/docs/IAM-user-manual/01a-standalone-server-config.md index 9fd58cbf..b7942947 100644 --- a/docs/IAM-user-manual/01a-standalone-server-config.md +++ b/docs/IAM-user-manual/01a-standalone-server-config.md @@ -13,7 +13,7 @@ ``` * Start __iam-service__ as standalone server. You can skip this step if you would like to use *iam-service* in docker container. ``` - java -Xms32m -Xmx128m -jar iam-service-2.5.5-RELEASE.jar \ + java -Xms32m -Xmx128m -jar iam-service-2.5.6-RELEASE.jar \ --spring.config.location=file:application.yml ``` * Build Docker Image locally and run, in case you prefer downloading image from dockerhub please skip this step. @@ -23,19 +23,19 @@ ``` * Use public docker dockerhub image [jurajveverka/iam-service](https://hub.docker.com/r/jurajveverka/iam-service) ``` - docker run -d --name iam-service-2.5.5-RELEASE \ + docker run -d --name iam-service-2.5.6-RELEASE \ --restart unless-stopped \ -e APP_CONFIG_PATH=/opt/data/application.yml \ -e XMX=128m \ -v '${IAM_DATA_DIR}':/opt/data \ - -p 8080:8080 jurajveverka/iam-service:2.5.5-RELEASE + -p 8080:8080 jurajveverka/iam-service:2.5.6-RELEASE ``` ``IAM_DATA_DIR`` points to directory where customized ``application.yml`` file is located. * Check docker status and logs ``` docker ps -a - docker exec -ti iam-service-2.5.5-RELEASE /bin/sh - docker logs --follow iam-service-2.5.5-RELEASE + docker exec -ti iam-service-2.5.6-RELEASE /bin/sh + docker logs --follow iam-service-2.5.6-RELEASE ``` * Verify Service state, check OpenAPI documentation. ``` @@ -48,9 +48,9 @@ ``` * Stop and cleanup Docker ``` - docker stop iam-service-2.5.5-RELEASE - docker rm iam-service-2.5.5-RELEASE - docker image rm -f iam-service:2.5.5-RELEASE + docker stop iam-service-2.5.6-RELEASE + docker rm iam-service-2.5.6-RELEASE + docker image rm -f iam-service:2.5.6-RELEASE ``` * [next step: Setup Persistence Layer](01b_setup-persitence-layer.md) diff --git a/docs/IAM-user-manual/02c-manage-organization-and-projects.md b/docs/IAM-user-manual/02c-manage-organization-and-projects.md index df1da100..c41110c5 100644 --- a/docs/IAM-user-manual/02c-manage-organization-and-projects.md +++ b/docs/IAM-user-manual/02c-manage-organization-and-projects.md @@ -27,8 +27,8 @@ All actions described below must be performed under project admin user identity. --data-raw '{ "id": "client-002", "name": "Second Client", - "defaultAccessTokenDuration": 3600, - "defaultRefreshTokenDuration": 3600, + "defaultAccessTokenDuration": 3600000, + "defaultRefreshTokenDuration": 3600000, "secret": "s3cr3t", "properties": { "redirectURL": "", @@ -66,8 +66,8 @@ All actions described below must be performed under project admin user identity. --data-raw '{ "id": "user-001", "name": "User Name", - "defaultAccessTokenDuration": 3600, - "defaultRefreshTokenDuration": 3600, + "defaultAccessTokenDuration": 3600000, + "defaultRefreshTokenDuration": 3600000, "email": "user@server.com", "password": "secret", "userProperties": { diff --git a/docs/k8s-deployments/iam-service-deployment.yml b/docs/k8s-deployments/iam-service-deployment.yml index a279534a..2d816404 100644 --- a/docs/k8s-deployments/iam-service-deployment.yml +++ b/docs/k8s-deployments/iam-service-deployment.yml @@ -15,7 +15,7 @@ spec: spec: containers: - name: iam-service - image: jurajveverka/iam-service:2.5.5-RELEASE + image: jurajveverka/iam-service:2.5.6-RELEASE ports: - name: http containerPort: 8080 diff --git a/iam-commons/iam-client-spring/README.md b/iam-commons/iam-client-spring/README.md index ece725e2..e664794f 100644 --- a/iam-commons/iam-client-spring/README.md +++ b/iam-commons/iam-client-spring/README.md @@ -8,12 +8,12 @@ This client library makes JWT verification easier for springboot micro-services one.microproject.iamservice iam-client-spring - 2.5.5-RELEASE + 2.5.6-RELEASE ``` * gradle dependency ``` - implementation 'one.microproject.iamservice:iam-client-spring:2.5.5-RELEASE' + implementation 'one.microproject.iamservice:iam-client-spring:2.5.6-RELEASE' ``` 2. See [this spring-method-security example](../../iam-examples/spring-method-security) * How to configure http security. diff --git a/iam-commons/iam-client-spring/build.gradle b/iam-commons/iam-client-spring/build.gradle index 84ca7d1f..b015324f 100644 --- a/iam-commons/iam-client-spring/build.gradle +++ b/iam-commons/iam-client-spring/build.gradle @@ -6,7 +6,7 @@ plugins { group = 'one.microproject.iamservice' archivesBaseName = "iam-client-spring" -version = '2.5.5-RELEASE' +version = '2.5.6-RELEASE' sourceCompatibility = '11' diff --git a/iam-commons/iam-client/README.md b/iam-commons/iam-client/README.md index a9398774..d00fd65b 100644 --- a/iam-commons/iam-client/README.md +++ b/iam-commons/iam-client/README.md @@ -8,12 +8,12 @@ This client library makes JWT verification easier for clients and micro-services one.microproject.iamservice iam-client - 2.5.5-RELEASE + 2.5.6-RELEASE ``` * gradle dependency ``` - implementation 'one.microproject.iamservice:iam-client:2.5.5-RELEASE' + implementation 'one.microproject.iamservice:iam-client:2.5.6-RELEASE' ``` 2. Create client instance programmatically. ``` diff --git a/iam-commons/iam-client/build.gradle b/iam-commons/iam-client/build.gradle index 185ce01a..d52342c3 100644 --- a/iam-commons/iam-client/build.gradle +++ b/iam-commons/iam-client/build.gradle @@ -6,7 +6,7 @@ plugins { group = 'one.microproject.iamservice' archivesBaseName = "iam-client" -version = '2.5.5-RELEASE' +version = '2.5.6-RELEASE' sourceCompatibility = '11' diff --git a/iam-commons/iam-core/build.gradle b/iam-commons/iam-core/build.gradle index b74f5f4e..22ccfbee 100644 --- a/iam-commons/iam-core/build.gradle +++ b/iam-commons/iam-core/build.gradle @@ -6,7 +6,7 @@ plugins { group = 'one.microproject.iamservice' archivesBaseName = "iam-core" -version = '2.5.5-RELEASE' +version = '2.5.6-RELEASE' sourceCompatibility = '11' repositories { diff --git a/iam-commons/iam-core/src/main/java/one/microproject/iamservice/core/utils/ModelUtils.java b/iam-commons/iam-core/src/main/java/one/microproject/iamservice/core/utils/ModelUtils.java index 9c7898c9..0067bc3f 100644 --- a/iam-commons/iam-core/src/main/java/one/microproject/iamservice/core/utils/ModelUtils.java +++ b/iam-commons/iam-core/src/main/java/one/microproject/iamservice/core/utils/ModelUtils.java @@ -56,7 +56,7 @@ public final class ModelUtils { private static final Logger LOG = LoggerFactory.getLogger(ModelUtils.class); - public static final String MODEL_VERSION = "2.5.5-RELEASE"; + public static final String MODEL_VERSION = "2.5.6-RELEASE"; public static final Model DEFAULT_MODEL = new ModelImpl(ModelId.from("default-model-001"), "Default Model"); public static final String IAM_ADMINS_NAME = "iam-admins"; public static final OrganizationId IAM_ADMINS_ORG = OrganizationId.from(IAM_ADMINS_NAME); diff --git a/iam-commons/iam-model/build.gradle b/iam-commons/iam-model/build.gradle index fd45bc0f..9aa6efbf 100644 --- a/iam-commons/iam-model/build.gradle +++ b/iam-commons/iam-model/build.gradle @@ -6,7 +6,7 @@ plugins { group = 'one.microproject.iamservice' archivesBaseName = "iam-model" -version = '2.5.5-RELEASE' +version = '2.5.6-RELEASE' sourceCompatibility = '11' diff --git a/iam-commons/iam-model/src/main/java/one/microproject/iamservice/core/dto/BuildInfo.java b/iam-commons/iam-model/src/main/java/one/microproject/iamservice/core/dto/BuildInfo.java index 3d7f120e..069dae72 100644 --- a/iam-commons/iam-model/src/main/java/one/microproject/iamservice/core/dto/BuildInfo.java +++ b/iam-commons/iam-model/src/main/java/one/microproject/iamservice/core/dto/BuildInfo.java @@ -10,26 +10,38 @@ public class BuildInfo { private final String artefact; private final String name; private final String version; + private final Long timestamp; + private final Long uptime; + private final String timezone; @JsonCreator public BuildInfo(@JsonProperty("id") String id, @JsonProperty("group") String group, @JsonProperty("artefact") String artefact, @JsonProperty("name") String name, - @JsonProperty("version") String version) { + @JsonProperty("version") String version, + @JsonProperty("timestamp") Long timestamp, + @JsonProperty("uptime") Long uptime, + @JsonProperty("timezone") String timezone) { this.id = id; this.group = group; this.artefact = artefact; this.name = name; this.version = version; + this.timestamp = timestamp; + this.uptime = uptime; + this.timezone = timezone; } - public BuildInfo(String id) { + public BuildInfo(String id, Long timestamp, Long uptime, String timezone) { this.id = id; this.group = null; this.artefact = null; this.name = null; this.version = null; + this.timestamp = timestamp; + this.uptime = uptime; + this.timezone = timezone; } public String getId() { @@ -52,4 +64,15 @@ public String getVersion() { return version; } + public Long getTimestamp() { + return timestamp; + } + + public Long getUptime() { + return uptime; + } + + public String getTimezone() { + return timezone; + } } diff --git a/iam-commons/iam-service-client/README.md b/iam-commons/iam-service-client/README.md index 11caf918..44a43385 100644 --- a/iam-commons/iam-service-client/README.md +++ b/iam-commons/iam-service-client/README.md @@ -8,12 +8,12 @@ Java client library providing APIs for all iam-service management functions. one.microproject.iamservice iam-service-client - 2.5.5-RELEASE + 2.5.6-RELEASE ``` * gradle dependency ``` - implementation 'one.microproject.iamservice:iam-service-client:2.5.5-RELEASE' + implementation 'one.microproject.iamservice:iam-service-client:2.5.6-RELEASE' ``` 2. Create client instance programmatically. ``` diff --git a/iam-commons/iam-service-client/build.gradle b/iam-commons/iam-service-client/build.gradle index e5e4cb8d..08cd6f02 100644 --- a/iam-commons/iam-service-client/build.gradle +++ b/iam-commons/iam-service-client/build.gradle @@ -6,7 +6,7 @@ plugins { group = 'one.microproject.iamservice' archivesBaseName = "iam-service-client" -version = '2.5.5-RELEASE' +version = '2.5.6-RELEASE' sourceCompatibility = '11' diff --git a/iam-examples/integration-tests/build.gradle b/iam-examples/integration-tests/build.gradle index 5293383d..34c12df2 100644 --- a/iam-examples/integration-tests/build.gradle +++ b/iam-examples/integration-tests/build.gradle @@ -3,7 +3,7 @@ plugins { } group = 'one.microproject.iamservice' -version = '2.5.5-RELEASE' +version = '2.5.6-RELEASE' sourceCompatibility = '11' repositories { diff --git a/iam-examples/performance-testing/build.gradle b/iam-examples/performance-testing/build.gradle index ca223ce0..139c50df 100644 --- a/iam-examples/performance-testing/build.gradle +++ b/iam-examples/performance-testing/build.gradle @@ -3,7 +3,7 @@ plugins { } group = 'one.microproject.iamservice' -version = '2.5.5-RELEASE' +version = '2.5.6-RELEASE' sourceCompatibility = '11' repositories { diff --git a/iam-examples/spring-method-security/Dockerfile b/iam-examples/spring-method-security/Dockerfile index 4bea4907..d1a4fc02 100644 --- a/iam-examples/spring-method-security/Dockerfile +++ b/iam-examples/spring-method-security/Dockerfile @@ -1,5 +1,5 @@ FROM adoptopenjdk/openjdk11:alpine-jre -COPY build/libs/spring-method-security-2.5.5-RELEASE.jar /spring-method-security-2.5.5-RELEASE.jar +COPY build/libs/spring-method-security-2.5.6-RELEASE.jar /spring-method-security-2.5.6-RELEASE.jar COPY start-service.sh /start-service.sh RUN chmod +x /start-service.sh RUN apk --no-cache add curl diff --git a/iam-examples/spring-method-security/README.md b/iam-examples/spring-method-security/README.md index 029f301f..1d45de6d 100644 --- a/iam-examples/spring-method-security/README.md +++ b/iam-examples/spring-method-security/README.md @@ -36,14 +36,14 @@ JWT tokens issued by __iam-service__ are used to get access to resources hosted ## Build and Run ``` gradle clean build -java -jar build/libs/spring-method-security-2.5.5-RELEASE.jar +java -jar build/libs/spring-method-security-2.5.6-RELEASE.jar ``` ### Build Docker image ``` -docker build . -t spring-method-security:2.5.5-RELEASE +docker build . -t spring-method-security:2.5.6-RELEASE docker image list -docker save --output="build/spring-method-security:2.5.5-RELEASE.tar" spring-method-security:2.5.5-RELEASE +docker save --output="build/spring-method-security:2.5.6-RELEASE.tar" spring-method-security:2.5.6-RELEASE docker image rm -f -docker run -p 8082:8082 spring-method-security:2.5.5-RELEASE +docker run -p 8082:8082 spring-method-security:2.5.6-RELEASE ``` diff --git a/iam-examples/spring-method-security/build.gradle b/iam-examples/spring-method-security/build.gradle index 8ca13d98..63f02cc0 100644 --- a/iam-examples/spring-method-security/build.gradle +++ b/iam-examples/spring-method-security/build.gradle @@ -5,7 +5,7 @@ plugins { } group = 'one.microproject.iamservice' -version = '2.5.5-RELEASE' +version = '2.5.6-RELEASE' sourceCompatibility = '11' repositories { diff --git a/iam-examples/spring-method-security/start-service.sh b/iam-examples/spring-method-security/start-service.sh index c86d8ac6..55a9445f 100755 --- a/iam-examples/spring-method-security/start-service.sh +++ b/iam-examples/spring-method-security/start-service.sh @@ -7,4 +7,4 @@ until $(curl --silent --output /dev/null -f http://127.0.0.1:8080/services/oauth sleep 1 done -java -Xms32m -Xmx128M -jar /spring-method-security-2.5.5-RELEASE.jar +java -Xms32m -Xmx128M -jar /spring-method-security-2.5.6-RELEASE.jar diff --git a/iam-examples/spring-resource-server/Dockerfile b/iam-examples/spring-resource-server/Dockerfile index 525d7893..876ffb20 100644 --- a/iam-examples/spring-resource-server/Dockerfile +++ b/iam-examples/spring-resource-server/Dockerfile @@ -1,5 +1,5 @@ FROM adoptopenjdk/openjdk11:alpine-jre -COPY build/libs/spring-resource-server-2.5.5-RELEASE.jar /spring-resource-server-2.5.5-RELEASE.jar +COPY build/libs/spring-resource-server-2.5.6-RELEASE.jar /spring-resource-server-2.5.6-RELEASE.jar COPY start-service.sh /start-service.sh RUN chmod +x /start-service.sh RUN apk --no-cache add curl diff --git a/iam-examples/spring-resource-server/README.md b/iam-examples/spring-resource-server/README.md index f62b70e9..202d4296 100644 --- a/iam-examples/spring-resource-server/README.md +++ b/iam-examples/spring-resource-server/README.md @@ -12,15 +12,15 @@ JWT tokens issues by __iam-service__ are used to get access to resources hosted ## Build and Run ``` gradle clean build -java -jar build/libs/spring-resource-server-2.5.5-RELEASE.jar +java -jar build/libs/spring-resource-server-2.5.6-RELEASE.jar ``` ### Build Docker image ``` -docker build . -t spring-resource-server:2.5.5-RELEASE +docker build . -t spring-resource-server:2.5.6-RELEASE docker image list -docker save --output="build/spring-resource-server:2.5.5-RELEASE.tar" spring-resource-server:2.5.5-RELEASE +docker save --output="build/spring-resource-server:2.5.6-RELEASE.tar" spring-resource-server:2.5.6-RELEASE docker image rm -f -docker run -p 8081:8081 spring-resource-server:2.5.5-RELEASE +docker run -p 8081:8081 spring-resource-server:2.5.6-RELEASE ``` ### Reference Documentation diff --git a/iam-examples/spring-resource-server/build.gradle b/iam-examples/spring-resource-server/build.gradle index 8418968e..d048d270 100644 --- a/iam-examples/spring-resource-server/build.gradle +++ b/iam-examples/spring-resource-server/build.gradle @@ -5,7 +5,7 @@ plugins { } group = 'one.microproject.iamservice' -version = '2.5.5-RELEASE' +version = '2.5.6-RELEASE' sourceCompatibility = '11' repositories { diff --git a/iam-examples/spring-resource-server/start-service.sh b/iam-examples/spring-resource-server/start-service.sh index bb737707..ae6b4b83 100755 --- a/iam-examples/spring-resource-server/start-service.sh +++ b/iam-examples/spring-resource-server/start-service.sh @@ -7,4 +7,4 @@ until $(curl --silent --output /dev/null -f http://127.0.0.1:8080/services/oauth sleep 1 done -java -Xms32m -Xmx128M -jar /spring-resource-server-2.5.5-RELEASE.jar +java -Xms32m -Xmx128M -jar /spring-resource-server-2.5.6-RELEASE.jar diff --git a/iam-examples/spring-webflux-secured/Dockerfile b/iam-examples/spring-webflux-secured/Dockerfile index 2d851fda..8633e908 100644 --- a/iam-examples/spring-webflux-secured/Dockerfile +++ b/iam-examples/spring-webflux-secured/Dockerfile @@ -1,5 +1,5 @@ FROM adoptopenjdk/openjdk11:alpine-jre -COPY build/libs/spring-webflux-secured-2.5.5-RELEASE.jar /spring-webflux-secured-2.5.5-RELEASE.jar +COPY build/libs/spring-webflux-secured-2.5.6-RELEASE.jar /spring-webflux-secured-2.5.6-RELEASE.jar COPY start-service.sh /start-service.sh RUN chmod +x /start-service.sh RUN apk --no-cache add curl diff --git a/iam-examples/spring-webflux-secured/build.gradle b/iam-examples/spring-webflux-secured/build.gradle index 48a4c2dd..3a9829b1 100644 --- a/iam-examples/spring-webflux-secured/build.gradle +++ b/iam-examples/spring-webflux-secured/build.gradle @@ -5,7 +5,7 @@ plugins { } group = 'one.microproject.iamservice' -version = '2.5.5-RELEASE' +version = '2.5.6-RELEASE' sourceCompatibility = '11' repositories { diff --git a/iam-examples/spring-webflux-secured/start-service.sh b/iam-examples/spring-webflux-secured/start-service.sh index cf424149..c71b5b40 100755 --- a/iam-examples/spring-webflux-secured/start-service.sh +++ b/iam-examples/spring-webflux-secured/start-service.sh @@ -7,4 +7,4 @@ until $(curl --silent --output /dev/null -f http://127.0.0.1:8080/services/oauth sleep 1 done -java -Xms32m -Xmx128M -jar /spring-webflux-secured-2.5.5-RELEASE.jar +java -Xms32m -Xmx128M -jar /spring-webflux-secured-2.5.6-RELEASE.jar diff --git a/iam-persistence/iam-caches-redis/build.gradle b/iam-persistence/iam-caches-redis/build.gradle index 4cdb9eb3..7b97623e 100644 --- a/iam-persistence/iam-caches-redis/build.gradle +++ b/iam-persistence/iam-caches-redis/build.gradle @@ -3,7 +3,7 @@ plugins { } group = 'one.microproject.iamservice' -version = '2.5.5-RELEASE' +version = '2.5.6-RELEASE' sourceCompatibility = '11' repositories { diff --git a/iam-persistence/iam-persistence-file-system/build.gradle b/iam-persistence/iam-persistence-file-system/build.gradle index 4cdb9eb3..7b97623e 100644 --- a/iam-persistence/iam-persistence-file-system/build.gradle +++ b/iam-persistence/iam-persistence-file-system/build.gradle @@ -3,7 +3,7 @@ plugins { } group = 'one.microproject.iamservice' -version = '2.5.5-RELEASE' +version = '2.5.6-RELEASE' sourceCompatibility = '11' repositories { diff --git a/iam-persistence/iam-persistence-mongo/build.gradle b/iam-persistence/iam-persistence-mongo/build.gradle index 4cdb9eb3..7b97623e 100644 --- a/iam-persistence/iam-persistence-mongo/build.gradle +++ b/iam-persistence/iam-persistence-mongo/build.gradle @@ -3,7 +3,7 @@ plugins { } group = 'one.microproject.iamservice' -version = '2.5.5-RELEASE' +version = '2.5.6-RELEASE' sourceCompatibility = '11' repositories { diff --git a/iam-service/Dockerfile b/iam-service/Dockerfile index db0d33b3..c3b25525 100644 --- a/iam-service/Dockerfile +++ b/iam-service/Dockerfile @@ -1,6 +1,6 @@ ARG ARCH="amd64" FROM ${ARCH}/adoptopenjdk:11-jre -COPY build/libs/iam-service-2.5.5-RELEASE.jar /iam-service-2.5.5-RELEASE.jar +COPY build/libs/iam-service-2.5.6-RELEASE.jar /iam-service-2.5.6-RELEASE.jar COPY iam-service-start.sh /iam-service-start.sh COPY src/main/resources/application.yml /application.yml COPY src/main/resources/application-cloud.yml /application-cloud.yml @@ -11,4 +11,5 @@ ENV SERVER_PORT 8080 ENV ADMIN_PASSWORD secret ENV ADMIN_SECRET top-secret ENV APP_CONFIG_PATH false +ENV JVM_OPTS "" ENTRYPOINT ["/iam-service-start.sh"] diff --git a/iam-service/README.md b/iam-service/README.md index 112fd6b7..d78c17f2 100644 --- a/iam-service/README.md +++ b/iam-service/README.md @@ -4,40 +4,40 @@ IAM as microservice. Standalone OAuth2/OpenID-connect authorization and authenti ## Build and Run ``` gradle clean build -java -jar build/libs/iam-service-2.5.5-RELEASE.jar +java -jar build/libs/iam-service-2.5.6-RELEASE.jar # run using customized configutation -java -jar build/libs/iam-service-2.5.5-RELEASE.jar --spring.config.location=file:/path/to/application.yml +java -jar build/libs/iam-service-2.5.6-RELEASE.jar --spring.config.location=file:/path/to/application.yml ``` ### Build Docker Image ``` -docker build -t iam-service:2.5.5-RELEASE . +docker build -t iam-service:2.5.6-RELEASE . docker image list -docker save --output="build/iam-service:2.5.5-RELEASE.tar" iam-service:2.5.5-RELEASE +docker save --output="build/iam-service:2.5.6-RELEASE.tar" iam-service:2.5.6-RELEASE ``` ### Run Docker Container ``` -docker run -d --name iam-service-2.5.5-RELEASE \ +docker run -d --name iam-service-2.5.6-RELEASE \ -e SERVER_PORT=8080 \ -e ADMIN_PASSWORD=secret \ -e ADMIN_SECRET=top-secret \ -e XMX=128m \ - -p 8080:8080 iam-service:2.5.5-RELEASE + -p 8080:8080 iam-service:2.5.6-RELEASE -docker run -d --name iam-service-2.5.5-RELEASE \ +docker run -d --name iam-service-2.5.6-RELEASE \ -e APP_CONFIG_PATH=/opt/data/application.yml \ -e XMX=128m \ -v /custom/data/dir:/opt/data \ - -p 8080:8080 iam-service:2.5.5-RELEASE + -p 8080:8080 iam-service:2.5.6-RELEASE -docker attach iam-service-2.5.5-RELEASE -docker logs iam-service-2.5.5-RELEASE +docker attach iam-service-2.5.6-RELEASE +docker logs iam-service-2.5.6-RELEASE ``` ### Docker Cleanup ``` -docker stop iam-service-2.5.5-RELEASE -docker rm iam-service-2.5.5-RELEASE -docker image rm -f iam-service:2.5.5-RELEASE +docker stop iam-service-2.5.6-RELEASE +docker rm iam-service-2.5.6-RELEASE +docker image rm -f iam-service:2.5.6-RELEASE ``` diff --git a/iam-service/build.gradle b/iam-service/build.gradle index 197f2f7e..e183ac2c 100644 --- a/iam-service/build.gradle +++ b/iam-service/build.gradle @@ -5,7 +5,7 @@ plugins { } group = 'one.microproject.iamservice' -version = '2.5.5-RELEASE' +version = '2.5.6-RELEASE' sourceCompatibility = '11' repositories { diff --git a/iam-service/iam-service-start.sh b/iam-service/iam-service-start.sh index 7931ae21..4b10409a 100644 --- a/iam-service/iam-service-start.sh +++ b/iam-service/iam-service-start.sh @@ -7,7 +7,7 @@ if [ "${APP_CONFIG_PATH}" = "false" ]; then echo "using default configuration" echo "SERVER_PORT=${SERVER_PORT}" echo "XMX=${XMX}" - java -Xms32m -Xmx${XMX} -Djava.security.egd=file:/dev/./urandom -jar /iam-service-2.5.5-RELEASE.jar \ + java -Xms32m -Xmx${XMX} ${JVM_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /iam-service-2.5.6-RELEASE.jar \ --server.port=${SERVER_PORT} \ --iam-service.data-model.default-admin-password=${ADMIN_PASSWORD} \ --iam-service.data-model.default-admin-secret=${ADMIN_SECRET} @@ -15,6 +15,6 @@ else echo "using custom configuration" echo "APP_CONFIG_PATH=${APP_CONFIG_PATH}" echo "XMX=${XMX}" - java -Xms32m -Xmx${XMX} -Djava.security.egd=file:/dev/./urandom -jar /iam-service-2.5.5-RELEASE.jar \ + java -Xms32m -Xmx${XMX} ${JVM_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /iam-service-2.5.6-RELEASE.jar \ --spring.config.location=file:${APP_CONFIG_PATH} fi diff --git a/iam-service/src/main/java/one/microproject/iamservice/server/config/ModelConfig.java b/iam-service/src/main/java/one/microproject/iamservice/server/config/ModelConfig.java index 981a7257..e33ba0f4 100644 --- a/iam-service/src/main/java/one/microproject/iamservice/server/config/ModelConfig.java +++ b/iam-service/src/main/java/one/microproject/iamservice/server/config/ModelConfig.java @@ -25,6 +25,7 @@ import javax.annotation.PreDestroy; import java.nio.file.Path; import java.security.Security; +import java.util.TimeZone; @Configuration @ConfigurationProperties(prefix="iam-service.data-model") @@ -53,6 +54,7 @@ public class ModelConfig { @PostConstruct private void init() { + String timeZone = TimeZone.getDefault().getID(); LOG.info("#CONFIG: initializing Bouncy Castle Provider (BCP) ..."); Security.addProvider(new BouncyCastleProvider()); LOG.info("#CONFIG: BCP initialized."); @@ -62,6 +64,7 @@ private void init() { LOG.info("#CONFIG: admin organization/project {}/{}", adminOrganization, adminProject); LOG.info("#CONFIG: persistence={}", persistence); LOG.info("#CONFIG: enableClientCredentialsFlow={}", enableClientCredentialsFlow); + LOG.info("#CONFIG: timezone {}", timeZone); } @Bean diff --git a/iam-service/src/main/java/one/microproject/iamservice/server/controller/DiscoveryController.java b/iam-service/src/main/java/one/microproject/iamservice/server/controller/DiscoveryController.java index e00a1b46..bc06ee8c 100644 --- a/iam-service/src/main/java/one/microproject/iamservice/server/controller/DiscoveryController.java +++ b/iam-service/src/main/java/one/microproject/iamservice/server/controller/DiscoveryController.java @@ -27,8 +27,10 @@ import org.springframework.web.bind.annotation.RestController; import java.security.cert.CertificateEncodingException; +import java.time.Instant; import java.util.Collection; import java.util.Optional; +import java.util.TimeZone; import java.util.UUID; @RestController @@ -42,6 +44,7 @@ public class DiscoveryController { private final ResourceServerService resourceServerService; private final BuildProperties buildProperties; private final String appInstanceId; + private final Long started; public DiscoveryController(@Autowired OrganizationManagerService organizationManagerService, @Autowired ResourceServerService resourceServerService, @@ -50,16 +53,21 @@ public DiscoveryController(@Autowired OrganizationManagerService organizationMan this.resourceServerService = resourceServerService; this.buildProperties = buildProperties; this.appInstanceId = UUID.randomUUID().toString(); + this.started = Instant.now().getEpochSecond(); LOG.info("IAM APP ID: {}", appInstanceId); } @GetMapping("/build-info") public ResponseEntity getBuildInfo() { + Long timestamp = Instant.now().getEpochSecond(); + Long uptime = timestamp - started; + String timezone = TimeZone.getDefault().getID(); + LOG.info("build-info: {} {} {} {}", appInstanceId, timestamp, uptime, timezone); if (buildProperties != null) { return ResponseEntity.ok(new BuildInfo(appInstanceId, - buildProperties.getGroup(), buildProperties.getArtifact(), buildProperties.getName(), buildProperties.getVersion())); + buildProperties.getGroup(), buildProperties.getArtifact(), buildProperties.getName(), buildProperties.getVersion(), timestamp, uptime, timezone)); } else { - return ResponseEntity.ok(new BuildInfo(appInstanceId)); + return ResponseEntity.ok(new BuildInfo(appInstanceId, timestamp, uptime, timezone)); } } diff --git a/release/Dockerfile b/release/Dockerfile index 77798061..421cf76b 100644 --- a/release/Dockerfile +++ b/release/Dockerfile @@ -1,6 +1,6 @@ ARG ARCH="amd64" FROM ${ARCH}/adoptopenjdk:11-jre -COPY iam-service-2.5.5-RELEASE.jar /iam-service-2.5.5-RELEASE.jar +COPY iam-service-2.5.6-RELEASE.jar /iam-service-2.5.6-RELEASE.jar COPY iam-service-start.sh /iam-service-start.sh COPY application-filesystem.yml /application.yml COPY application-cloud.yml /application-cloud.yml @@ -11,4 +11,5 @@ ENV SERVER_PORT 8080 ENV ADMIN_PASSWORD secret ENV ADMIN_SECRET top-secret ENV APP_CONFIG_PATH "/application.yml" +ENV JVM_OPTS "" ENTRYPOINT ["/iam-service-start.sh"] diff --git a/release/README-release.md b/release/README-release.md index 26e03bb3..085d1cb4 100644 --- a/release/README-release.md +++ b/release/README-release.md @@ -1,6 +1,6 @@ -# IAM Service 2.5.5-RELEASE +# IAM Service 2.5.6-RELEASE Really simple standalone OAuth2/OIDC -[*Identity Access Management* (IAM) service](https://github.com/jveverka/iam-service/tree/2.5.5-RELEASE), +[*Identity Access Management* (IAM) service](https://github.com/jveverka/iam-service/tree/2.5.6-RELEASE), authentication and authorization server. ## Quick startup guide @@ -12,12 +12,12 @@ authentication and authorization server. ``` * Start __iam-service__ (Requires JVM installed). ``` - java -Xms32m -Xmx128m -jar iam-service-2.5.5-RELEASE.jar --spring.config.location=file:application.yml + java -Xms32m -Xmx128m -jar iam-service-2.5.6-RELEASE.jar --spring.config.location=file:application.yml ``` * Start __iam-service__ as docker container. ``` - docker run -d --name iam-service-2.5.5-RELEASE \ - -p 8080:8080 jurajveverka/iam-service:2.5.5-RELEASE + docker run -d --name iam-service-2.5.6-RELEASE \ + -p 8080:8080 jurajveverka/iam-service:2.5.6-RELEASE ``` ### Next Steps diff --git a/release/RELEASE-CHECKLIST.md b/release/RELEASE-CHECKLIST.md index dafe015c..8bd907b5 100644 --- a/release/RELEASE-CHECKLIST.md +++ b/release/RELEASE-CHECKLIST.md @@ -3,7 +3,7 @@ * Make sure all changes are committed and pushed. * Make sure the documentation is up-to date. * Make sure all tests are passing. -* ``NEW_RELEASE_VERSION=2.5.5-RELEASE`` +* ``NEW_RELEASE_VERSION=2.5.6-RELEASE`` * Upgrade component version in script below. ``` ./version-upgrade.sh @@ -44,8 +44,8 @@ ``` * Test created docker image. ``` - docker logs --follow iam-service-2.5.5-RELEASE - docker exec -it iam-service-2.5.5-RELEASE /bin/sh + docker logs --follow iam-service-2.5.6-RELEASE + docker exec -it iam-service-2.5.6-RELEASE /bin/sh ``` * Publish docker image to dockerhub. ``` @@ -54,9 +54,9 @@ * Publish docker manifest ``` docker manifest create \ - jurajveverka/iam-service:2.5.5-RELEASE \ - --amend jurajveverka/iam-service:2.5.5-RELEASE-amd64 \ - --amend jurajveverka/iam-service:2.5.5-RELEASE-arm64v8 + jurajveverka/iam-service:2.5.6-RELEASE \ + --amend jurajveverka/iam-service:2.5.6-RELEASE-amd64 \ + --amend jurajveverka/iam-service:2.5.6-RELEASE-arm64v8 - docker manifest push jurajveverka/iam-service:2.5.5-RELEASE + docker manifest push jurajveverka/iam-service:2.5.6-RELEASE ``` \ No newline at end of file diff --git a/release/RELEASE-NOTES.md b/release/RELEASE-NOTES.md index d7f898f1..59421bee 100644 --- a/release/RELEASE-NOTES.md +++ b/release/RELEASE-NOTES.md @@ -1,12 +1,12 @@ # IAM service - OAuth2 server -Simple standalone OAuth2/OIDC [*Identity Access Management* (IAM) service](https://github.com/jveverka/iam-service/tree/v2.5.5-RELEASE), authentication and authorization server. +Simple standalone OAuth2/OIDC [*Identity Access Management* (IAM) service](https://github.com/jveverka/iam-service/tree/v2.5.6-RELEASE), authentication and authorization server. ## Quick startup guide 1. Start OAuth2 server in default configuration [dockerhub project](https://hub.docker.com/r/jurajveverka/iam-service). ``` - docker run --name iam-service-2.5.5-RELEASE \ + docker run --name iam-service-2.5.6-RELEASE \ --restart unless-stopped \ - -d -p 8080:8080 jurajveverka/iam-service:2.5.5-RELEASE + -d -p 8080:8080 jurajveverka/iam-service:2.5.6-RELEASE curl 'http://localhost:8080/services/discovery' | json_pp curl 'http://localhost:8080/services/oauth2/iam-admins/iam-admins/.well-known/openid-configuration' | json_pp ``` @@ -15,6 +15,6 @@ Simple standalone OAuth2/OIDC [*Identity Access Management* (IAM) service](http http://localhost:8080/swagger-ui/index.html?url=/v3/api-docs#/ ``` ## Advanced configurations -1. Download release file ``iam-service-release-2.5.5-RELEASE.zip`` +1. Download release file ``iam-service-release-2.5.6-RELEASE.zip`` 2. Please check [__User's Guide__](https://github.com/jveverka/iam-service/tree/2.x.x/docs/IAM-user-manual) and [__Examples__](https://github.com/jveverka/iam-service/tree/2.x.x/iam-examples) for more details. diff --git a/release/create-release.sh b/release/create-release.sh index 1ebba81b..5cce7922 100755 --- a/release/create-release.sh +++ b/release/create-release.sh @@ -7,7 +7,7 @@ cd .. ./run-full-test-suite.sh eval_result_exit $? "Build ${GREEN}OK${NOCOLOR}" "${RED}ERROR: build failed !${NOCOLOR}" -VERSION=2.5.5-RELEASE +VERSION=2.5.6-RELEASE RELEASE_DIR=build/iam-service-${VERSION} cd ${HOME_DIR} diff --git a/release/docker-create-image.sh b/release/docker-create-image.sh index 64e433d9..05903f6f 100755 --- a/release/docker-create-image.sh +++ b/release/docker-create-image.sh @@ -4,7 +4,7 @@ NOCOLOR='\033[0m' RED='\033[0;31m' GREEN='\033[0;32m' -VERSION=2.5.5-RELEASE +VERSION=2.5.6-RELEASE DOCKER_IMAGE=jurajveverka/iam-service DOCKER_NAME=iam-service diff --git a/release/version-upgrade.sh b/release/version-upgrade.sh index 49b1b99c..e29e1d7d 100755 --- a/release/version-upgrade.sh +++ b/release/version-upgrade.sh @@ -1,7 +1,7 @@ #!/bin/bash -OLD_VERSION=2.5.4-RELEASE -NEW_VERSION=2.5.5-RELEASE +OLD_VERSION=2.5.5-RELEASE +NEW_VERSION=2.5.6-RELEASE cd ..