Conversation
f02d53a to
98644ec
Compare
This comment was marked as resolved.
This comment was marked as resolved.
|
@midigofrank this PR will mean that CLI users can attach any credential to a project (so long as they know the name and owner) Can I just check that the Provisioner has proper security and won't attach a credential to a project unless the PAT being used has the appropriate permissions? Like I can't attach a credential that you own with my PAT |
|
This works pretty well in manual tests ✅ Take an existing project and run Problems though: Both can be fixed but will take time I don't have. EDIT: I had a brainwave and both issue should now be FIXED |
This fixes the issue of having to pre-assign credentials in the app
|
@josephjclark yes, you cannot use someone else's credential. Your PAT only gets you access to your credentials or credentials that already exist in the project |
This PR updates credential tracking in a new project to use a credential id, rather than the UUID.
This has several benefits:
how this works is the project.yaml will track all attached credentials for that project on that instance, mapping the id to a UUID. Just like a v1 state file does. The workflow.yaml only contains the id. When syncing to that instance, the CLI will map the credential id to a UUID and send it to the provisioner.
There are some problems I see which I think we'll come back to later:
Both problems can be overcome if we allow a credential to have an explicit unique id that can be set in the app. Default it to
owner-nameby all means - but allow it to be changed, so that it can be standardised across instances (and have sensitive information removed).Fixes #1254
TODO:
Known Issues
QA
credentialsarray, and also use credential ids internallydeploy, if mapped to an existing credential, the credential should be linked in the appAI Usage
Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):
You can read more details in our
Responsible AI Policy