Skip to content

Conversation

@V02460
Copy link
Contributor

@V02460 V02460 commented Aug 8, 2025

Implements the secrets.keys_dir config option as an alternative to secrets.keys. Contains unit tests and documentation.

Currently managing MAS key material is intertwined with managing MAS configuration: it is not possible to provide signing keys to MAS without some prior knowledge of their content, filename or count. This PR resolves that limitation by introducing the secrets.keys_dir config option.

The secrets.keys_dir config option allows specifying a single directory that is expected to contain one file per MAS signingkey. The key files are read from the directory when a KeyStore is created via SecretsConfig::key_store().

Requires #4876 to derive a key’s kid.

@V02460
Copy link
Contributor Author

V02460 commented Sep 8, 2025

Rebase to incorporate #4876.

@V02460
Copy link
Contributor Author

V02460 commented Oct 22, 2025

@sandhose Could you please take a look at this PR? 👉👈

Copy link
Member

@sandhose sandhose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very sorry for the delay on getting back to this. Ironically I had a review started about a month ago 😅

This is a very nice addition, the only thing I would ask is to make the keys and keys_dir additive options and not exclusive

#[schemars(with = "KeysRaw")]
#[serde_as(as = "serde_with::TryFromInto<KeysRaw>")]
#[serde(flatten)]
keys: Keys,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think they should be additive, not exclusive in this case, since it's a list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants