Skip to content

Use Ceph Monitor's KV store to persist keys/secrets#28

Draft
JoshuaGabriel wants to merge 5 commits into
auth-clifrom
persist-jwt-key
Draft

Use Ceph Monitor's KV store to persist keys/secrets#28
JoshuaGabriel wants to merge 5 commits into
auth-clifrom
persist-jwt-key

Conversation

@JoshuaGabriel
Copy link
Copy Markdown
Contributor

As of now we are storing everything ceph-api needs into the fs. If we are planning to deploy this on the cluster we should persist keys/secrets/tokens (everything) on the monitor's kv.

This is the simplest way to have some persistence besides bringing in an external db or just on the filesystem.

This PR implements storing the JWT key and the GlobalSecret fosite uses.

Storing it under:
ceph-api/auth/jwt-key/active
ceph-api/auth/global-secret/active

we should nest this way to make use of 'config-key dump' interface instead of listing as much as possible

This PR is stacked on top of #27

Load or create the auth server RSA signing key from
monitor config-key storage so JWTs remain valid across process restarts.

Signed-off-by: Joshua Blanch <joshua.blanch@clyso.com>
Signed-off-by: Joshua Blanch <joshua.blanch@clyso.com>
if we have multiple ceph-api processes starting at the same time,
they can both miss in load() and generate a key then also call config-key
set at the same time.

Signed-off-by: Joshua Blanch <joshua.blanch@clyso.com>
store fosite's GlobalSecret in config-key alongside JWT key.

Signed-off-by: Joshua Blanch <joshua.blanch@clyso.com>
rename storeJWTKey and LoadJWTKey to have similar logic to
GlobalSecret pair

Signed-off-by: Joshua Blanch <joshua.blanch@clyso.com>
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.

1 participant