Skip to content

feat(credential): set default encryption key #981

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Jul 8, 2025

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits using a GPG signature

To recreate commits with GPG signature git fetch upstream && git rebase --force --gpg-sign upstream/main


Related to cryostatio/cryostat-operator#1134

Description of the change:

Uses a default value of default_key for the pgcrypto functions used in the Credential keyring table. Normally when deploying Cryostat with cryostat-db, the encrypt.key database configuration parameter should be set and this key will be used to symmetrically encrypt/decrypt the credentials in the keyring. However, in cases where it is not possible to set such configuration parameters and where relaxed data security may be acceptable, then Cryostat should be able to cope with the database not having an encrypt.key configuration parameter.

Without this change, attempting to hook up Cryostat to a database instance which does not have an encrypt.key config results in the Credential table being completely unusable, which would preclude any usage of stored credentials - including Cryostat Agent registration.

When deploying Cryostat alongside cryostat-db, or any other database instance which does have the encrypt.key configuration parameter set, then this will still use that key. In the case of cryostat-db this is normally done using an environment variable, and the Cryostat Operator or Helm Chart automatically sets up the database and Cryostat deployments to share this value via a Secret.

@andrewazores
Copy link
Member Author

/build_test

Copy link

github-actions bot commented Jul 8, 2025

Workflow started at 7/8/2025, 4:14:33 PM. View Actions Run.

Copy link

github-actions bot commented Jul 8, 2025

No GraphQL schema changes detected.

Copy link

github-actions bot commented Jul 8, 2025

No OpenAPI schema changes detected.

Copy link

github-actions bot commented Jul 8, 2025

CI build and push: At least one test failed ❌
https://github.com/cryostatio/cryostat/actions/runs/16153415674

Copy link

github-actions bot commented Jul 8, 2025

CI build and push: All tests pass ✅
https://github.com/cryostatio/cryostat/actions/runs/16153415674

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request safe-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant