developerhelperhub / klight-api-gateway

We’re building an API gateway for a microservices application with a focus on high performance and efficient request handling.
1 stars 0 forks source link

Load the credentials configuration from the config-security.yaml file #10

Closed developerhelperhub closed 3 days ago

developerhelperhub commented 3 days ago

As security, we have to configure all credentials of api gateway services in the 'config-security.yaml' file instead of 'config.yaml' file. This helps to key security file to store into secret vault in the Kubernetes service, `config.yaml' configuration can be configured in the config-map in the Kubernetes service

Acceptance Criteria

developerhelperhub commented 3 days ago

Implemented the following functionality

Example config.yaml

mongodb:
  host: localhost
  port: 27017
  db: klight-api-gateway
  connection_pool_size: 1

openid:
  discovery_url: "http://127.0.0.1:8084/realms/klight-api-gateway/.well-known/openid-configuration"
  validate_scope: false
  flow_type: introspection
  introspection_endpoint: "http://127.0.0.1:8084/realms/klight-api-gateway/protocol/openid-connect/token/introspect"

Example config-security.yaml

mongodb:
  username: klight-api-gateway
  password: klight-api-gateway

openid:
  client_id: klight-api-gateway-openid-connect
  client_secret: TYxTbrLzFagelYymONmgmSVfueiJnckT