Description
We have multiple products (e.g. Trino) that can take a list of usernames + passwords and authenticate users against that list (see https://trino.io/docs/current/security/password-file.html)
Trino e.g. takes a list of bcrypt passwords.
We need an standardized way to express such list of usernames + passwords. We already have the standardized AuthenticationClass, so we want a new provider 'static'
apiVersion: authentication.stackable.tech/v1alpha1
kind: AuthenticationClass
metadata:
name: simple-trino-users
spec:
provider:
static:
userCredentialsSecret:
name: simple-trino-users-secret # mandatory, needs to be in same Namespace as product
---
apiVersion: v1
kind: Secret
metadata:
name: simple-trino-users-secret
namespace: default
type: kubernetes.io/opaque
stringData:
admin: admin
alice: superpass
bob: secret
The only possible problem is that the AuthenticationClass
is cluster-scoped and Secrets are namespaced.
It might be the case that the current solution has the downside that the userCredentialsSecret
needs to be in the same Namespace as the Product using it (Secrets can't be mounted cross-namespace). A solution could be the cluster-scoped SecretClass but that introduces complexity
- We store the credentials as plain text within the Secret. Some products need the credentials as plain text, others hashed. To achieve a commons mechanism we need to store the credentials in plain text.
- The secret gets mounted as files. The entrypoint of the product Pod collects them together in the format accepted by the product. If hashing is need it hashes as well. If it makes sense, parts are moved to operator-rs.
- Restart-controller is enabled and should work as normal
- OPTIONAL: Some product allow hot-reloading the credentials (e.g. Trino). In this case no restart shut be done, i think the secret should update automatically. This would need additional functionality in restart controller to white- or blacklist certain volumes.
- If hot-reloading is not implemented, follow-up ticket is created.
- Documentation exists (ideally also for tls, see this comment but if that becomes too much we can split this in an extra ticket
Metadata
Metadata
Assignees
Type
Projects
Status