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

feat(cloud-native): secure mounted configuration schema #10550

Open
iromli opened this issue Jan 5, 2025 · 0 comments · May be fixed by #10577
Open

feat(cloud-native): secure mounted configuration schema #10550

iromli opened this issue Jan 5, 2025 · 0 comments · May be fixed by #10577
Assignees
Labels
enhancement kind-feature Issue or PR is a new feature request

Comments

@iromli
Copy link
Contributor

iromli commented Jan 5, 2025

Is your feature request related to a problem? Please describe.

Current configuration schema (default to /etc/jans/conf/configuration.json) mounted to container contains sensitive data for secrets. These data need to be secured to conform to our policy.

Example of configuration.json:

{
  "_configmap": {
    "admin_email": "[email protected]",
    "auth_enc_keys": "RSA1_5 RSA-OAEP",
    "auth_sig_keys": "RS256 RS384 RS512 ES256 ES384 ES512 PS256 PS384 PS512",
    "city": "Austin",
    "country_code": "US",
    "hostname": "demo.example.com",
    "init_keys_exp": 4,
    "optional_scopes": "[\"sql\"]",
    "orgName": "Janssen",
    "state": "TX"
  },
  "_secret": {
    "admin_password": "<redacted>",
    "encoded_salt": "",
    "redis_password": "<redacted>",
    "sql_password": "<redacted>"
  }
}

Describe the solution you'd like

When possible, obfuscate the entire contents of mounted configuration schema. To allow backward-compatibility, non-obfuscated configuration schema should be allowed as well.

Example of obfuscated configuration.json:

aA19rmPCKUOsT4BNA40wM2iZj5QwAuQtKEeEPZMb6CDDp3r5BU6R+hGZIXVyKAap4dYXcMn5cdnuD2Y5KLYz5kEqD0+PeTUKDgueEQzOoVw==

This will require extra file (e.g. /etc/jans/conf/configuration.key) contains key to decrypt/encrypt the contents, for example:

cdkbB1zoyReLqdFExos7211b

Additional context

Helm has template function to encrypt text https://helm.sh/docs/chart_template_guide/function_list/#encryptaes. This can be used in Helm charts.
For low-level (container) support, https://github.com/iromli/sprig-aes contains python-based functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement kind-feature Issue or PR is a new feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants