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

Introduce per-environment JWKS paths #44

Merged
merged 24 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e049dbc
Bump develop to 1.2.0-alpha0 (#37)
frankinspace Jun 4, 2024
daae1e3
Merge branch 'main' of github-frankinspace:podaac/swodlr-api into dev…
Jun 4, 2024
6479fea
bump version to 1.2.0-alpha1
github-actions[bot] Jun 4, 2024
fa782fb
Multiticket Update (#39)
joshgarde Jun 10, 2024
e2c3dbf
Cache Fix + Invalidate Change (#40)
joshgarde Jun 12, 2024
2f4a939
Initial filtering implementation (#41)
joshgarde Jun 12, 2024
40821b9
update changelog to add cache fix and filter performance improvement.
viviant100 Jun 15, 2024
99c4f23
revert Build 'n Deploy from push '*' wildcard to push branches in bui…
viviant100 Jun 15, 2024
1fb5e8d
fix syntax
viviant100 Jun 15, 2024
40950a8
fix syntax
viviant100 Jun 15, 2024
c344b54
bump version to 1.2.0-alpha2
github-actions[bot] Jun 15, 2024
51c21b7
bump develop to 1.3.0-alpha0
viviant100 Jun 15, 2024
716c144
Update graphql schema with new filtering endpoint
joshgarde Jun 17, 2024
c6e8bd6
bump version to 1.3.0-alpha1
github-actions[bot] Jun 17, 2024
790d182
Update content and rename CHANGELOG to CHANGELOG.md.
viviant100 Jun 18, 2024
d4138ed
bump version to 1.3.0-alpha2
github-actions[bot] Jun 18, 2024
450cd7f
Hotfix product filtering
joshgarde Jun 20, 2024
cbd4a90
Merge branch 'main' of https://github.com/podaac/swodlr-api into develop
viviant100 Jun 20, 2024
4a93a48
bump version to 1.3.0-alpha3
github-actions[bot] Jun 20, 2024
f47a697
Introduce per-environment JWKS paths
joshgarde Jun 27, 2024
213842b
Switch all envs to use OPS keys
joshgarde Jun 27, 2024
02d9779
Update CHANGELOG.md
frankinspace Jun 27, 2024
703c11e
Update bumpver.toml
frankinspace Jun 27, 2024
0180a0c
Update build.gradle
frankinspace Jun 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Cache Fix + Invalidate Change (#40)


## [1.1.0]

### Added
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

group = 'gov.nasa.podaac.swodlr'
version = '1.2.0'
version = '1.3.0-alpha3'
sourceCompatibility = '17'

repositories {
Expand Down
2 changes: 1 addition & 1 deletion bumpver.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpver]
current_version = "1.2.0"
current_version = "1.3.0-alpha3"
version_pattern = "MAJOR.MINOR.PATCH[-TAGNUM]"
commit = true
tag = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public class SwodlrSecurityProperties {
private final JWEDecrypter decrypter;
private final Duration sessionLength;
private final String edlBaseUrl;
private final String edlJwksPath;
private final String edlClientId;
private final String edlClientSecret;

Expand All @@ -31,6 +32,7 @@ public SwodlrSecurityProperties(
String sessionEncryptionKey,
Duration sessionLength,
String edlBaseUrl,
String edlJwksPath,
String edlClientId,
String edlClientSecret
) {
Expand All @@ -49,6 +51,7 @@ public SwodlrSecurityProperties(

this.sessionLength = sessionLength;
this.edlBaseUrl = edlBaseUrl;
this.edlJwksPath = edlJwksPath;
this.edlClientId = edlClientId;
this.edlClientSecret = edlClientSecret;
}
Expand All @@ -69,6 +72,10 @@ public String edlBaseUrl() {
return edlBaseUrl;
}

public String edlJwksPath() {
return edlJwksPath;
}

public String edlClientId() {
return edlClientId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
.oauth2ResourceServer((resourceServer) -> {
resourceServer.jwt((jwt) -> {
ReactiveJwtDecoder jwtDecoder = new NimbusReactiveJwtDecoder(
securityProperties.edlBaseUrl() + "/export_edl_jwks"
securityProperties.edlBaseUrl() + securityProperties.edlJwksPath()
);

jwt
Expand Down
8 changes: 7 additions & 1 deletion terraform/app.tf
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,18 @@ resource "aws_ssm_parameter" "app_db_password" {
value = aws_ssm_parameter.db_app_password.value
}

resource "aws_ssm_parameter" "app_edl_base_path" {
resource "aws_ssm_parameter" "app_edl_base_url" {
name = "${local.app_path}/swodlr.security.edl-base-url"
type = "String"
value = var.edl_base_url
}

resource "aws_ssm_parameter" "app_edl_jwks_path" {
name = "${local.app_path}/swodlr.security.edl-jwks-path"
type = "String"
value = var.edl_jwks_path
}

resource "aws_ssm_parameter" "app_edl_client_id" {
name = "${local.app_path}/swodlr.security.edl-client-id"
type = "String"
Expand Down
3 changes: 2 additions & 1 deletion terraform/environments/ops.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ export BUCKET=podaac-services-ops-terraform

export TF_VAR_container_image_tag=main
export TF_VAR_active_profiles="[\"\"]"
export TF_VAR_tea_mapping="{\"podaac-swot-ops-swodlr-protected\"=\"archive.swot.podaac.earthdata.nasa.gov\"}"
export TF_VAR_tea_mapping="{\"podaac-swot-ops-swodlr-protected\"=\"archive.swot.podaac.earthdata.nasa.gov\"}"
export TF_VAR_edl_jwks_path=".well-known/edl_ops_jwks.json"
1 change: 1 addition & 0 deletions terraform/environments/sit.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ export BUCKET=podaac-services-sit-terraform
export TF_VAR_container_image_tag=develop
export TF_VAR_active_profiles="[\"dev\"]"
export TF_VAR_tea_mapping="{\"podaac-swot-sit-swodlr-protected\"=\"archive.swot.podaac.sit.earthdata.nasa.gov\"}"
export TF_VAR_edl_jwks_path=".well-known/edl_ops_jwks.json"
frankinspace marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions terraform/environments/uat.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ export BUCKET=podaac-services-uat-terraform
export TF_VAR_container_image_tag=develop
export TF_VAR_active_profiles="[\"\"]"
export TF_VAR_tea_mapping="{\"podaac-swot-uat-swodlr-protected\"=\"archive.swot.podaac.uat.earthdata.nasa.gov\"}"
export TF_VAR_edl_jwks_path=".well-known/edl_ops_jwks.json"
frankinspace marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 4 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ variable "edl_base_url" {
type = string
}

variable "edl_jwks_path" {
type = string
}

variable "edl_client_id" {
type = string
}
Expand Down