Credential references: env: references are not scoped per driver instance #849
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Residual from #835. The per-instance rule only applies to
secret:references (secret:galaxy/<instance>/…).env:OTOPCUA_GALAXY_…/env:GALAXY_MXGW_…have no instance naming convention, so any Galaxy driver may name any of them. Options: define a convention (e.g.env:OTOPCUA_GALAXY_<INSTANCE>_…) and apply the same rule, or deprecate env: for credentials in favour ofsecret:. Cross-repo idea: mxaccessgw could bind each API key to the client identity / Galaxy it was issued for, so a captured key is useless elsewhere.Fixed (
4a6229e4, review fixd68dff09). Pushed to master in03e51457.env:references follow the per-instance rule:env:<PREFIX><INSTANCE>_…with PREFIX inOTOPCUA_GALAXY_,GALAXY_MXGW_,OTOPCUA_OPCUACLIENT_,OTOPCUA_HEIDENHAIN_and INSTANCE = driver id or name upper-cased with non-letters/digits →_. A variable naming another same-type driver is refused at save, deploy (CredentialReferenceOtherInstance), Test Connect and browse; shared variables naming no driver still work. Id-form variables (…DRV_<12 HEX>…) match by id only, so no driver name can break them. Name-form is reliable for ASCII names only — use the id form.Upgrade note: a driver whose name is a prefix of another same-type driver's env var (e.g. a Galaxy driver named
APIvsenv:GALAXY_MXGW_API_KEY) is refused at its next deploy; the /raw banner lists these. The mxaccessgw key-binding idea is not done (cross-repo).