-
Notifications
You must be signed in to change notification settings - Fork 54
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
Default developer credentials Secret should be made usable as is by client app #1827
Comments
The "developer" secret utilises the identities.yaml format because it's necessary for users to be able to create multiple credentials, each of which can optionally have authorization roles associated with them. Whereas the "operator" secret only requires a single user, which should only be used by the Operator itself and Prometheus integrations, hence why we can simply expose the That being said @tux-o-matic, I agree that there should be a simple way for an application to automatically connect to the Infinispan cluster. The solution is for the Infinispan cluster to expose a ServiceBinding Secret that contains all of the required connection details for a specific user #1725. Once this has been exposed, applications can consume ProposalAdd an additional field to
serviceBinding: my-user-1
credentials:
- username: my-user-1
password: changeme
roles:
- admin
- username: my-user-2
password: changeme
roles:
- monitor |
Should the |
@tux-o-matic That's something I considered, but I wasn't sure whether it was a good idea to expose the credential username via the CR. WDYT @Crumby @rigazilla? We could have: spec:
serviceBinding:
enabled: true | false
credential: <username> If |
Or to integrate with the existing security:
description: InfinispanSecurity info for the user application connection
properties:
authorization:
properties:
enabled:
type: boolean
exposeServiceBinding:
type: boolean
roles:
[...] Because as far as I understand it, the CRD can be used to define custom roles as part og the |
I don't think it belongs under
The "developer" user is only used when a user doesn't provide their own credential secret via Maybe the default for |
I'm in favour of use Infinispan CR for this
|
I would rather the user didn't have to create an additional Secret just for this purpose. Maybe we can have a hybrid approach, whereby the ServiceBinding is enabled via the CR but the user to expose is configured in the existing credential secret? So it would be: CR: spec:
serviceBinding:
enabled: true | false # Defaults to true Secret specified via serviceBindingUser: my-user-1
identities.yaml: |
credentials:
- username: my-user-1
password: changeme If the user doesn't provide a Secret via |
yep this solution is better, I was worried about adding things inside the identities.yaml... (Just for clarity: I was considering the secret creations a task of the admin not something in charge of the consumer) Do we plan to provide something more multi-tenant? I mean something like serviceBindingRW, serviceBindingRO ? In case, can this solution be easily extended ? |
The ServiceBinding Operator doesn't allow such multi-tenancy when binding to a CR. The secret providing the connection details is established by inspecting the If the user requires a more complex setup like you describe, they could create multiple Secrets and ServiceBindings explicitly, but I don't think we can automatically provision such resources as it's very much use-case dependent. |
Oh ok. |
There shouldn't be passwords in the |
By default the Operator generates two Secrets:
username
andpassword
keys.For applications meant to connect to the Infinispan cluster, say a Quarkus Java app with the HotRod client, the content of the Secret for the "developer" user must be copied in distinct Secret (and ideally via SealedSecret or Vault in a proper CD way).
If the Secret for the "developer" user was generated exactly like the Secret for the "operator" user, the Pod for the Java client app could just reference the Secret and use the
username
andpassword
as ENV values in a container which then can be interpolated natively in the Java properties file used to configure the HotRod client.By having two different formats between the Secrets generated, manual work is required for the developers to use those credentials. If the format was the same, meaning also having simple keys for the "developer" credentials, it would be transparent to reference the Secret and the password would never have to be copied before being able to use Infinispan
The text was updated successfully, but these errors were encountered: