generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: authentication and authorization with keycloak (#42)
* feat: remove spring web flux and add spring web mvc * feat: user repository unit tests working * ci: autogenerated JaCoCo coverage badge * doc: update readme to remove web flux * feat: add authorization and authentication handlers * feat: integration tests passing with mocked user and authentication * feat: add documentation to security config class * feat: add jwt client roles from auth - partial * feat: handle roles from jwt decoded token * ci: add variable to keycloak server and workflow update * ci: fix missing keycloak server realm env var * fix: build service image with keycloak server variable * feat: add docker build args env var * feat: add cors handling to spring security * feat: correct version from main * feat: remove run-with-bd script * feat: add service authority to enable read and write from testing * doc: add steps to build and run with docker and docker-compose * feat: remove argument from docker image build * feat: remove docker build args from the workflow * feat: improve security config and enable csrf * feat: add csrf handler * feat: improve application properties file organization * feat: collectors to list code smell related to immutability * feat: remove unused import * feat: improve keycloak realm variable name Co-authored-by: Ci Bot <cibot@users.noreply.github.com>
- Loading branch information
1 parent
b81ebc7
commit 86a51a3
Showing
11 changed files
with
164 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
# Server and application | ||
spring.application.name = nr-fsa-service-api-4139 | ||
server.port = 8090 | ||
nrbestapi.version = ${NRBESTAPI_VERSION:#{'dev'}} | ||
server.allowed.cors.origins = ${ALLOWED_ORIGINS:#{'http://localhost:300*'}} | ||
|
||
spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver | ||
spring.jpa.database-platform=org.hibernate.dialect.Oracle12cDialect | ||
# Key Cloak, authentication and security | ||
keycloak-auth = ${KEYCLOAK_REALM_URL:https://empty.com/auth} | ||
spring.security.oauth2.resourceserver.jwt.issuer-uri = ${keycloak-auth} | ||
spring.security.oauth2.resourceserver.jwt.jwk-set-uri = ${keycloak-auth}/protocol/openid-connect/certs | ||
|
||
# Database, datasource and JPA | ||
spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver | ||
spring.datasource.url = jdbc:oracle:thin:@tcps://${DATABASE_HOST}:${DATABASE_PORT}/${SERVICE_NAME} | ||
spring.datasource.username = ${DATABASE_USER} | ||
spring.datasource.password = ${DATABASE_PASSWORD} | ||
spring.jpa.database-platform=org.hibernate.dialect.Oracle12cDialect | ||
|
||
# Actuator and ops | ||
management.endpoint.health.show-details = always | ||
|
||
# Others | ||
nrbestapi.version = ${NRBESTAPI_VERSION:#{'dev'}} | ||
server.allowed.cors.origins = ${ALLOWED_ORIGINS:#{'http://localhost:300*'}} |
Oops, something went wrong.