Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: P4ADEV-1754 configuring inner security #12

Merged
merged 11 commits into from
Jan 7, 2025
5 changes: 5 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ val springDocOpenApiVersion = "2.7.0"
val openApiToolsVersion = "0.2.6"
val micrometerVersion = "1.4.1"
val postgresJdbcVersion = "42.7.4"
val bouncycastleVersion = "1.79"

dependencies {
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-oauth2-resource-server")
implementation("org.springframework.boot:spring-boot-starter-data-rest")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-actuator")
Expand All @@ -44,6 +46,9 @@ dependencies {
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
implementation("org.openapitools:jackson-databind-nullable:$openApiToolsVersion")

//security
implementation("org.bouncycastle:bcprov-jdk18on:$bouncycastleVersion")

//postgres jdbc
implementation("org.postgresql:postgresql:$postgresJdbcVersion")

Expand Down
11 changes: 11 additions & 0 deletions gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.2=compileClasspath
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2=compileClasspath
com.fasterxml.jackson.module:jackson-module-parameter-names:2.18.2=compileClasspath
com.fasterxml.jackson:jackson-bom:2.18.2=compileClasspath
com.github.stephenc.jcip:jcip-annotations:1.0-1=compileClasspath
com.jayway.jsonpath:json-path:2.9.0=compileClasspath
com.nimbusds:nimbus-jose-jwt:9.37.3=compileClasspath
com.zaxxer:HikariCP:5.1.0=compileClasspath
io.micrometer:context-propagation:1.1.2=compileClasspath
io.micrometer:micrometer-commons:1.14.2=compileClasspath
Expand Down Expand Up @@ -50,6 +52,7 @@ org.apache.tomcat.embed:tomcat-embed-el:10.1.34=compileClasspath
org.apache.tomcat.embed:tomcat-embed-websocket:10.1.34=compileClasspath
org.aspectj:aspectjweaver:1.9.22.1=compileClasspath
org.atteo:evo-inflector:1.3=compileClasspath
org.bouncycastle:bcprov-jdk18on:1.79=compileClasspath
org.hibernate.orm:hibernate-core:6.6.4.Final=compileClasspath
org.jspecify:jspecify:1.0.0=compileClasspath
org.openapitools:jackson-databind-nullable:0.2.6=compileClasspath
Expand All @@ -69,6 +72,7 @@ org.springframework.boot:spring-boot-starter-data-rest:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-jdbc:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-json:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-logging:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-oauth2-resource-server:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-tomcat:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-web:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter:3.4.1=compileClasspath
Expand All @@ -79,6 +83,13 @@ org.springframework.data:spring-data-rest-core:4.4.1=compileClasspath
org.springframework.data:spring-data-rest-webmvc:4.4.1=compileClasspath
org.springframework.hateoas:spring-hateoas:2.4.1=compileClasspath
org.springframework.plugin:spring-plugin-core:3.0.0=compileClasspath
org.springframework.security:spring-security-config:6.4.2=compileClasspath
org.springframework.security:spring-security-core:6.4.2=compileClasspath
org.springframework.security:spring-security-crypto:6.4.2=compileClasspath
org.springframework.security:spring-security-oauth2-core:6.4.2=compileClasspath
org.springframework.security:spring-security-oauth2-jose:6.4.2=compileClasspath
org.springframework.security:spring-security-oauth2-resource-server:6.4.2=compileClasspath
org.springframework.security:spring-security-web:6.4.2=compileClasspath
org.springframework:spring-aop:6.2.1=compileClasspath
org.springframework:spring-aspects:6.2.1=compileClasspath
org.springframework:spring-beans:6.2.1=compileClasspath
Expand Down
1 change: 1 addition & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ microservice-chart:
ORGANIZATION_DB_USER: db-mypay-login-username
ORGANIZATION_DB_PASSWORD: db-mypay-login-password
BROKER_ENCRYPT_PASSWORD: broker-encrypt-password
JWT_TOKEN_PUBLIC_KEY: jwt-public-key

# nodeSelector: {}

Expand Down
244 changes: 127 additions & 117 deletions openapi/generated.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"url" : "http://localhost",
"description" : "Generated server url"
} ],
"security" : [ {
"BearerAuth" : [ ]
} ],
"tags" : [ {
"name" : "Broker",
"description" : "the Broker API"
Expand Down Expand Up @@ -740,6 +743,122 @@
}
}
},
"EntityModelBroker" : {
"type" : "object",
"properties" : {
"brokerId" : {
"type" : "integer",
"format" : "int64"
},
"organizationId" : {
"type" : "integer",
"format" : "int64"
},
"brokerFiscalCode" : {
"type" : "string"
},
"brokerName" : {
"type" : "string"
},
"pagoPaInteractionModel" : {
"type" : "string",
"enum" : [ "SYNC", "SYNC_ACA", "SYNC$GPDPRELOAD", "SYNC_ACA$GPDPRELOAD", "ASYNC_GPD" ]
},
"stationId" : {
"type" : "string"
},
"broadcastStationId" : {
"type" : "string"
},
"syncKey" : {
"type" : "string",
"format" : "byte"
},
"gpdKey" : {
"type" : "string",
"format" : "byte"
},
"acaKey" : {
"type" : "string",
"format" : "byte"
},
"personalisationFe" : {
"$ref" : "#/components/schemas/PersonalisationFe"
},
"_links" : {
"$ref" : "#/components/schemas/Links"
}
}
},
"PageMetadata" : {
"type" : "object",
"properties" : {
"size" : {
"type" : "integer",
"format" : "int64"
},
"totalElements" : {
"type" : "integer",
"format" : "int64"
},
"totalPages" : {
"type" : "integer",
"format" : "int64"
},
"number" : {
"type" : "integer",
"format" : "int64"
}
}
},
"PagedModelEntityModelBroker" : {
"type" : "object",
"properties" : {
"_embedded" : {
"type" : "object",
"properties" : {
"broker" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/EntityModelBroker"
}
}
}
},
"_links" : {
"$ref" : "#/components/schemas/Links"
},
"page" : {
"$ref" : "#/components/schemas/PageMetadata"
}
}
},
"PersonalisationFe" : {
"type" : "object",
"properties" : {
"headerAssistanceUrl" : {
"type" : "string"
},
"logoFooterImg" : {
"type" : "string"
},
"footerDescText" : {
"type" : "string"
},
"footerPrivacyInfoUrl" : {
"type" : "string"
},
"footerGDPRUrl" : {
"type" : "string"
},
"footerTermsCondUrl" : {
"type" : "string"
},
"footerAccessibilityUrl" : {
"type" : "string"
}
}
},
"EntityModelOrganization" : {
"type" : "object",
"properties" : {
Expand Down Expand Up @@ -853,27 +972,6 @@
}
}
},
"PageMetadata" : {
"type" : "object",
"properties" : {
"size" : {
"type" : "integer",
"format" : "int64"
},
"totalElements" : {
"type" : "integer",
"format" : "int64"
},
"totalPages" : {
"type" : "integer",
"format" : "int64"
},
"number" : {
"type" : "integer",
"format" : "int64"
}
}
},
"PagedModelEntityModelOrganization" : {
"type" : "object",
"properties" : {
Expand All @@ -896,101 +994,6 @@
}
}
},
"EntityModelBroker" : {
"type" : "object",
"properties" : {
"brokerId" : {
"type" : "integer",
"format" : "int64"
},
"organizationId" : {
"type" : "integer",
"format" : "int64"
},
"brokerFiscalCode" : {
"type" : "string"
},
"brokerName" : {
"type" : "string"
},
"pagoPaInteractionModel" : {
"type" : "string",
"enum" : [ "SYNC", "SYNC_ACA", "SYNC$GPDPRELOAD", "SYNC_ACA$GPDPRELOAD", "ASYNC_GPD" ]
},
"stationId" : {
"type" : "string"
},
"broadcastStationId" : {
"type" : "string"
},
"syncKey" : {
"type" : "string",
"format" : "byte"
},
"gpdKey" : {
"type" : "string",
"format" : "byte"
},
"acaKey" : {
"type" : "string",
"format" : "byte"
},
"personalisationFe" : {
"$ref" : "#/components/schemas/PersonalisationFe"
},
"_links" : {
"$ref" : "#/components/schemas/Links"
}
}
},
"PagedModelEntityModelBroker" : {
"type" : "object",
"properties" : {
"_embedded" : {
"type" : "object",
"properties" : {
"broker" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/EntityModelBroker"
}
}
}
},
"_links" : {
"$ref" : "#/components/schemas/Links"
},
"page" : {
"$ref" : "#/components/schemas/PageMetadata"
}
}
},
"PersonalisationFe" : {
"type" : "object",
"properties" : {
"headerAssistanceUrl" : {
"type" : "string"
},
"logoFooterImg" : {
"type" : "string"
},
"footerDescText" : {
"type" : "string"
},
"footerPrivacyInfoUrl" : {
"type" : "string"
},
"footerGDPRUrl" : {
"type" : "string"
},
"footerTermsCondUrl" : {
"type" : "string"
},
"footerAccessibilityUrl" : {
"type" : "string"
}
}
},
"BrokerRequestBody" : {
"type" : "object",
"properties" : {
Expand Down Expand Up @@ -1188,6 +1191,13 @@
}
}
}
},
"securitySchemes" : {
"BearerAuth" : {
"type" : "http",
"scheme" : "bearer",
"bearerFormat" : "JWT"
}
}
}
}
}
Loading
Loading