wso2 / product-microgateway

Choreo Connect is a cloud-native, open-source, and developer-centric API gateway.
https://wso2.com/choreo/choreo-connect/
Apache License 2.0
293 stars 252 forks source link

Remove unnecessary configs passed from Adapter to Enforcer through xDS messages #3491

Closed renuka-fernando closed 7 months ago

renuka-fernando commented 7 months ago

Purpose

$subject

Logs

adapter-1 | 2024-02-16 15:10:13 INFO [marshaller.go:346] - [xds.MarshalKeyManager] [-] [Renuka] Key Manager Configuration Before Filter: map[AuthorizeURL:https://choreo-am-service:9443/oauth2/authorize LogoutURL:https://choreo-am-service:9443/oidc/logout OAuthConfigurations.EncryptPersistedTokens:true RevokeURL:https://choreo-am-service:9443/oauth2/revoke ServerURL:https://choreo-am-service:9443/services/ TokenURL:https://choreo-am-service:9443/oauth2/token VALIDITY_PERIOD:3600 authorize_endpoint:https://choreo-am-service:9443/oauth2/authorize certificate_type:JWKS certificate_value:https://sts.preview-dv.choreo.dev/oauth2/jwks enable_map_oauth_consumer_apps:false enable_oauth_app_creation:true enable_token_encryption:false enable_token_generation:true enable_token_hash:false grant_types:[refresh_token urn:ietf:params:oauth:grant-type:saml2-bearer password client_credentials iwa:ntlm authorization_code urn:ietf:params:oauth:grant-type:token-exchange urn:ietf:params:oauth:grant-type:jwt-bearer] issuer:https://sts.preview-dv.choreo.dev:443/oauth2/token logout_endpoint:https://choreo-am-service:9443/oidc/logout revoke_endpoint:https://choreo-am-service:9443/oauth2/revoke self_validate_jwt:true token_endpoint:https://choreo-am-service:9443/oauth2/token token_format_string:[{"enable":true,"type":"REFERENCE","value":"[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}"}] validation_enable:true] adapter-1 | 2024-02-16 15:10:13 INFO [marshaller.go:350] - [xds.MarshalKeyManager] [-] [Renuka] Key Manager Configuration After Filter: {"certificate_type":"JWKS","certificate_value":"https://sts.preview-dv.choreo.dev/oauth2/jwks","issuer":"https://sts.preview-dv.choreo.dev:443/oauth2/token","self_validate_jwt":true} adapter-1 | 2024-02-16 15:10:13 INFO [marshaller.go:346] - [xds.MarshalKeyManager] [-] [Renuka] Key Manager Configuration Before Filter: map[authorize_endpoint:https://dev.api.asgardeo.io/t/renukafernando/oauth2/authorize certificate_type:JWKS certificate_value:https://dev.api.asgardeo.io/t/renukafernando/oauth2/jwks claim_mappings:[] client_registration_endpoint:https://dev.api.asgardeo.io/t/renukafernando/api/server/v1 consumer_key_claim:azp enable_map_oauth_consumer_apps:false enable_oauth_app_creation:true enable_token_encryption:false enable_token_generation:true enable_token_hash:false grant_types:[refresh_token password client_credentials authorization_code implicit] issuer:https://dev.api.asgardeo.io/t/renukafernando/oauth2/token revoke_endpoint:https://dev.api.asgardeo.io/t/renukafernando/oauth2/revoke scopes_claim:scope self_validate_jwt:true token_endpoint:https://dev.api.asgardeo.io/t/renukafernando/oauth2/token] adapter-1 | 2024-02-16 15:10:13 INFO [marshaller.go:350] - [xds.MarshalKeyManager] [-] [Renuka] Key Manager Configuration After Filter: {"certificate_type":"JWKS","certificate_value":"https://dev.api.asgardeo.io/t/renukafernando/oauth2/jwks","claim_mappings":[],"consumer_key_claim":"azp","issuer":"https://dev.api.asgardeo.io/t/renukafernando/oauth2/token","scopes_claim":"scope","self_validate_jwt":true}

Formatted Config

{
  "certificate_type": "JWKS",
  "certificate_value": "https://sts.preview-dv.choreo.dev/oauth2/jwks",
  "issuer": "https://sts.preview-dv.choreo.dev:443/oauth2/token",
  "self_validate_jwt": true
}
{
  "certificate_type": "JWKS",
  "certificate_value": "https://dev.api.asgardeo.io/t/renukafernando/oauth2/jwks",
  "claim_mappings": [],
  "consumer_key_claim": "azp",
  "issuer": "https://dev.api.asgardeo.io/t/renukafernando/oauth2/token",
  "scopes_claim": "scope",
  "self_validate_jwt": true
}

Event based key manager configs

adapter-1 | 2024-02-16 15:22:42 INFO [notification_listener.go:164] - [messaging.handleKeyManagerEvents] [-] decoded Key Manager stream {"claim_mappings":[],"authorize_endpoint":"https://dev.api.asgardeo.io/t/renukafernando/oauth2/authorize","grant_types":["refresh_token","password","client_credentials","authorization_code","implicit"],"enable_oauth_app_creation":true,"certificate_value":"https://dev.api.asgardeo.io/t/renukafernando/oauth2/jwks","enable_token_generation":true,"issuer":"https://dev.api.asgardeo.io/t/renukafernando/oauth2/token","enable_map_oauth_consumer_apps":false,"enable_token_hash":false,"self_validate_jwt":true,"revoke_endpoint":"https://dev.api.asgardeo.io/t/renukafernando/oauth2/revoke","scopes_claim":"scope","enable_token_encryption":false,"client_registration_endpoint":"https://dev.api.asgardeo.io/t/renukafernando/api/server/v1","consumer_key_claim":"azp","certificate_type":"JWKS","token_endpoint":"https://dev.api.asgardeo.io/t/renukafernando/oauth2/token"} adapter-1 | 2024-02-16 15:22:42 INFO [notification_listener.go:177] - [messaging.handleKeyManagerEvents] [-] Key Manager data map[authorize_endpoint:https://dev.api.asgardeo.io/t/renukafernando/oauth2/authorize certificate_type:JWKS certificate_value:https://dev.api.asgardeo.io/t/renukafernando/oauth2/jwks claim_mappings:[] client_registration_endpoint:https://dev.api.asgardeo.io/t/renukafernando/api/server/v1 consumer_key_claim:azp enable_map_oauth_consumer_apps:false enable_oauth_app_creation:true enable_token_encryption:false enable_token_generation:true enable_token_hash:false grant_types:[refresh_token password client_credentials authorization_code implicit] issuer:https://dev.api.asgardeo.io/t/renukafernando/oauth2/token revoke_endpoint:https://dev.api.asgardeo.io/t/renukafernando/oauth2/revoke scopes_claim:scope self_validate_jwt:true token_endpoint:https://dev.api.asgardeo.io/t/renukafernando/oauth2/token] adapter-1 | 2024-02-16 15:22:42 INFO [marshaller.go:346] - [xds.MarshalKeyManager] [-] [Renuka] Key Manager Configuration Before Filter: map[authorize_endpoint:https://dev.api.asgardeo.io/t/renukafernando/oauth2/authorize certificate_type:JWKS certificate_value:https://dev.api.asgardeo.io/t/renukafernando/oauth2/jwks claim_mappings:[] client_registration_endpoint:https://dev.api.asgardeo.io/t/renukafernando/api/server/v1 consumer_key_claim:azp enable_map_oauth_consumer_apps:false enable_oauth_app_creation:true enable_token_encryption:false enable_token_generation:true enable_token_hash:false grant_types:[refresh_token password client_credentials authorization_code implicit] issuer:https://dev.api.asgardeo.io/t/renukafernando/oauth2/token revoke_endpoint:https://dev.api.asgardeo.io/t/renukafernando/oauth2/revoke scopes_claim:scope self_validate_jwt:true token_endpoint:https://dev.api.asgardeo.io/t/renukafernando/oauth2/token] adapter-1 | 2024-02-16 15:22:42 INFO [marshaller.go:350] - [xds.MarshalKeyManager] [-] [Renuka] Key Manager Configuration After Filter: {"certificate_type":"JWKS","certificate_value":"https://dev.api.asgardeo.io/t/renukafernando/oauth2/jwks","claim_mappings":[],"consumer_key_claim":"azp","issuer":"https://dev.api.asgardeo.io/t/renukafernando/oauth2/token","scopes_claim":"scope","self_validate_jwt":true}

Issues

Fixes #

Automation tests

Tested environments

Not Tested


Maintainers: Check before merge

choreo-cicd commented 7 months ago

[succeeded] Dataplane(NorthEU) cluster : dev-deployment-v2 : 20240222.15

choreo-cicd commented 7 months ago

[succeeded] : dev-deployment-v2 : 20240222.15

choreo-cicd commented 7 months ago

[succeeded] Controlplane cluster : dev-deployment-v2 : 20240222.15

choreo-cicd commented 7 months ago

[succeeded] Dataplane(EastUS) cluster : dev-deployment-v2 : 20240222.15

choreo-cicd commented 7 months ago

[succeeded] : stage-deployment-v2 : 20240223.1

choreo-cicd commented 7 months ago

[failed] Dataplane(EastUS) cluster : stage-deployment-v2 : 20240223.1

choreo-cicd commented 7 months ago

[failed] Controlplane cluster : stage-deployment-v2 : 20240223.1

choreo-cicd commented 7 months ago

[succeeded] Dataplane(NorthEU) cluster : stage-deployment-v2 : 20240223.1

choreo-cicd commented 7 months ago

[] Dataplane(NorthEU) cluster : stage-deployment-v2 : 20240224.1

choreo-cicd commented 7 months ago

[] : stage-deployment-v2 : 20240224.1

choreo-cicd commented 7 months ago

[] Dataplane(EastUS) cluster : stage-deployment-v2 : 20240224.1

choreo-cicd commented 7 months ago

[] Controlplane cluster : stage-deployment-v2 : 20240224.1

choreo-cicd commented 7 months ago

[succeeded] : prod-deployment-v2 : 20240227.2

choreo-cicd commented 7 months ago

[failed] Controlplane cluster : prod-deployment-v2 : 20240227.2

choreo-cicd commented 7 months ago

[succeeded] Controlplane cluster : prod-deployment-v2 : 20240227.2

choreo-cicd commented 7 months ago

[succeeded] : prod-deployment-v2 : 20240227.2

choreo-cicd commented 7 months ago

[] Dataplane(NorthEU) cluster : prod-deployment-v2 : 20240227.5

choreo-cicd commented 7 months ago

[] Dataplane(EastUS) cluster : prod-deployment-v2 : 20240227.5

choreo-cicd commented 7 months ago

[] : prod-deployment-v2 : 20240227.5

choreo-cicd commented 7 months ago

[] Controlplane cluster : prod-deployment-v2 : 20240227.5