diff --git a/.gitmodules b/.gitmodules index 9519ae6..02aca57 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "core/src/main/resources/frontend"] path = core/src/main/resources/frontend url = https://github.com/osable/frontend.git + branch = release diff --git a/core/build.gradle.kts b/core/build.gradle.kts index f5d24f6..8868c7e 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -14,7 +14,7 @@ dependencies { // Spring MVC implementation("org.springframework.boot:spring-boot-starter-web") implementation("org.springframework.boot:spring-boot-starter-thymeleaf") - implementation("org.springframework.boot:spring-boot-starter-oauth2-resource-server") + implementation("org.springframework.boot:spring-boot-starter-oauth2-client") implementation("org.springframework.boot:spring-boot-starter-webflux") diff --git a/core/src/main/kotlin/net/osable/core/GitHubReactiveOpaqueTokenIntrospector.kt b/core/src/main/kotlin/net/osable/core/GitHubReactiveOpaqueTokenIntrospector.kt deleted file mode 100644 index bac7b56..0000000 --- a/core/src/main/kotlin/net/osable/core/GitHubReactiveOpaqueTokenIntrospector.kt +++ /dev/null @@ -1,14 +0,0 @@ -package net.osable.core - -import org.springframework.security.oauth2.core.DefaultOAuth2AuthenticatedPrincipal -import org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal -import org.springframework.security.oauth2.server.resource.introspection.ReactiveOpaqueTokenIntrospector -import reactor.core.publisher.Mono - -class GitHubReactiveOpaqueTokenIntrospector : ReactiveOpaqueTokenIntrospector { - override fun introspect(token: String): Mono { - println("Token: $token") - return Mono.just(DefaultOAuth2AuthenticatedPrincipal(mapOf(), null)) - } - -} \ No newline at end of file diff --git a/core/src/main/kotlin/net/osable/core/SecurityConfiguration.kt b/core/src/main/kotlin/net/osable/core/SecurityConfiguration.kt index 97a4c27..b30e4c3 100644 --- a/core/src/main/kotlin/net/osable/core/SecurityConfiguration.kt +++ b/core/src/main/kotlin/net/osable/core/SecurityConfiguration.kt @@ -31,7 +31,7 @@ class SecurityConfiguration { }.csrf { // Configure CSRF token it.csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse()) - }.oauth2ResourceServer() + }.oauth2Client() return http.build() } diff --git a/core/src/main/resources/application-development.yaml b/core/src/main/resources/application-development.yaml index a4b7090..abd9e3e 100644 --- a/core/src/main/resources/application-development.yaml +++ b/core/src/main/resources/application-development.yaml @@ -1,7 +1,8 @@ spring: - profiles: development - config: + activate: + on-profile: development + import: optional:secrets.yaml eureka: diff --git a/core/src/main/resources/application-production.yaml b/core/src/main/resources/application-production.yaml index af17420..5730ab7 100644 --- a/core/src/main/resources/application-production.yaml +++ b/core/src/main/resources/application-production.yaml @@ -1,10 +1,12 @@ spring: - profiles: production + config: + activate: + on-profile: production eureka: client: service-url: - defaultZone: http\://discovery.osable.svc.cluster.local\:8761/eureka + defaultZone: http://discovery.osable.svc.cluster.local:8761/eureka instance: hostname: core.osable.svc.cluster.local diff --git a/core/src/main/resources/application.yaml b/core/src/main/resources/application.yaml index b4c373d..3017bf4 100644 --- a/core/src/main/resources/application.yaml +++ b/core/src/main/resources/application.yaml @@ -1,5 +1,7 @@ spring: - profiles: development, production + config: + activate: + on-profile: development, production application: name: core