Skip to content

Commit

Permalink
Merge pull request #113 from RADAR-base/release-0.7.4
Browse files Browse the repository at this point in the history
Release 0.7.4
  • Loading branch information
yatharthranjan authored Oct 17, 2024
2 parents 4f55643 + ba1b656 commit 7de76e7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@Suppress("ConstPropertyName")
object Versions {
const val project = "0.7.2"
const val project = "0.7.4"

const val java = 17
const val kotlin = "1.9.22"
Expand Down
2 changes: 2 additions & 0 deletions gateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,5 @@ auth:
#ecdsa: []
# RSA public keys
#rsa: []
# jwks URLs to fetch public keys from
#publicKeyUrls: []
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ data class AuthConfig(
val keyStore: KeyStoreConfig = KeyStoreConfig(),
/** Public keys for checking the digital signature of OAuth 2.0 JWTs. */
val publicKeys: KeyConfig = KeyConfig(),
/** Public key URLs for checking the digital signature of OAuth 2.0 JWTs. */
val publicKeyUrls: List<String>? = null,
) {
fun validate() {
keyStore.validate()
check(managementPortalUrl != null || keyStore.isConfigured || publicKeys.isConfigured) {
"At least one of auth.keyStore, auth.publicKeys or auth.managementPortalUrl must be configured"
check(managementPortalUrl != null || keyStore.isConfigured || publicKeys.isConfigured || !publicKeyUrls.isNullOrEmpty()) {
"At least one of auth.keyStore, auth.publicKeys, auth.publicKeyUrls or auth.managementPortalUrl must be configured"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class EcdsaJwtEnhancerFactory(private val config: GatewayConfig) : EnhancerFacto
jwtKeystoreAlias = config.auth.keyStore.alias,
jwtKeystorePassword = config.auth.keyStore.password,
jwtKeystorePath = config.auth.keyStore.path.toString(),
jwksUrls = config.auth.publicKeyUrls ?: emptyList(),
)
return listOf(
GatewayResourceEnhancer(config),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class ManagementPortalEnhancerFactory(private val config: GatewayConfig) : Enhan
),
jwtResourceName = config.auth.resourceName,
jwtIssuer = config.auth.issuer,
jwksUrls = config.auth.publicKeyUrls ?: emptyList(),
)
return listOf(
GatewayResourceEnhancer(config),
Expand Down

0 comments on commit 7de76e7

Please sign in to comment.