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

Allow app to fetch configuration from a configuration server #1318

Closed
greenlaw110 opened this issue Mar 26, 2020 · 0 comments
Closed

Allow app to fetch configuration from a configuration server #1318

greenlaw110 opened this issue Mar 26, 2020 · 0 comments
Assignees
Milestone

Comments

@greenlaw110
Copy link
Contributor

greenlaw110 commented Mar 26, 2020

Description

When app is booting up, in case a configuration server is ready for use, it shall be able to pull the configuration for the app from the server.

A configuration server's endpoint can be configured as:

app.name=${project.artifactId}
conf.endpoint=https://conf-server/conf
# default key is app-name + profile
conf.id=${app.name}-${profile}

With the given setting, app shall request application configuration from:

GET https://conf-server/conf?id=${conf.id}

The response shall be an encrypted (refer to "Security concern" section below) plain text. Once decrypted, it shall be a JSON encoded configurations, e.g:

{
  "http.port":"12345",
  "session.ttl":"60"
}

App shall use the received configuration to overwrite local provisioned configurations.

Security concern

There are obvious concerns around how to secure the communication between app and configuration server.

How to ensure app's configuration is secured

  • A RSA key pair shall be generated for each app key.
  • The private key shall be kept with app by configuration conf.private-key
  • The public key shall be registered the app's key to configuration server.
  • Once app requesting its configuration from the server, configuration server shall use the public key to encrypt the configuration
  • Upon receiving configuration from configuration server, app shall use private key to decrypt configuration.

How to prevent configuration server from being accessed by non-authorised part

  • Deploy Configuration server in the intranet
  • Apply IP filter rules to prevent access to configuration server from unknown IP addresses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant