You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After #1952 lands, OpenstackCreds parses clouds.yaml but in practice only with auth_type: v3password (username/password). Production and regulated deployments need OpenStack Application Credentials for:
Revocation independent of the user account
Role-subset scoping (grant only the roles vjailbreak needs, not full user impersonation)
Optional expires_at for time-bounded one-shot migrations
No user password stored at rest in Kubernetes Secrets
Proposal
Support auth_type: v3applicationcredential in clouds.yaml. The credential format is:
clouds:
destination:
auth_type: v3applicationcredentialauth:
auth_url: https://keystone.example.com:5000/v3application_credential_id: <id>application_credential_secret: <secret>region_name: RegionOneinterface: public
github.com/gophercloud/utils/openstack/clientconfig (already imported in #1952) handles this auth_type natively; no new gophercloud auth code is required. The work is in surfacing Application-Credential-specific validation conditions on the OpenstackCreds resource and documenting the operator workflow.
Scope
Verify clientconfig correctly constructs gophercloud.AuthOptions with ApplicationCredentialID / ApplicationCredentialSecret when auth_type: v3applicationcredential is set.
Extend validation in k8s/migration/pkg/utils/credutils.go to:
403 from a downstream service → RolesSufficient=False, Reason=InsufficientRoles with role names extracted from the response body when available
Network failure → Reason=KeystoneUnreachable
TLS failure → Reason=TLSVerificationFailed
Update OpenstackCredsController to populate Expiring / Expired / RolesSufficient Conditions per reconcile pass; rely on the periodic 1-hour requeue scheduled in Accept clouds.yaml in OpenstackCreds Secret #1952 for time-based transitions.
Operator runbook section in docs/credentials.md covering:
Explicit enumeration of the minimum role set vjailbreak requires (member plus the vjailbreak-migrator role covering Cinder scheduler-stats and Nova hypervisor read)
Rotation workflow (create new App Cred, update Secret in place, watch picks up the change)
Revocation after migration
Acceptance criteria
clouds.yaml with auth_type: v3applicationcredential authenticates successfully (no username/password required).
App Cred whose expires_at is in the past → Expired=True. Within 7 days → Expiring=True, Reason=Within7Days. Within 30 days → Within30Days. Beyond 30 days → Expiring=False.
Revoked App Cred → CredentialsValidated=False, Reason=CredentialInvalidOrRevoked on next reconcile.
Insufficient roles → RolesSufficient=False, Reason=InsufficientRoles; missing role names listed in the condition message when Keystone provides them.
Unit tests cover the auth-type parsing branch, expiration evaluation (past / within 7d / within 30d / beyond), and Keystone error mapping.
Integration test runs a full validation flow against a real Keystone using an App Cred scoped to member + custom role.
docs/credentials.md "Application Credentials (recommended)" section published, including the explicit role set enumeration.
Negative test: revoke the App Cred mid-validation; confirm clean error message and condition transition.
Open questions for maintainers
Surfacing the expiration-soon warning: log line, Kubernetes Event, or only the Condition. Recommend Condition + Event for operator visibility.
Documentation placement: extend docs/credentials.md (created in Accept clouds.yaml in OpenstackCreds Secret #1952) versus a dedicated docs/application-credentials.md. Recommend the former for discoverability.
Minimum Keystone version: confirm Queens (2018) as a documented prerequisite.
Branch name
1953-clouds-yaml-app-credentials (matches repo convention); branched off main after #1952 merges.
Sub-issue 2 — Application Credentials via clouds.yaml
Title: Support v3applicationcredential auth_type in clouds.yaml
Parent: #1951
Depends on: #1952
Labels (suggested):
enhancement,area/credentials,area/securityProblem
After #1952 lands,
OpenstackCredsparsesclouds.yamlbut in practice only withauth_type: v3password(username/password). Production and regulated deployments need OpenStack Application Credentials for:expires_atfor time-bounded one-shot migrationsProposal
Support
auth_type: v3applicationcredentialinclouds.yaml. The credential format is:github.com/gophercloud/utils/openstack/clientconfig(already imported in #1952) handles this auth_type natively; no new gophercloud auth code is required. The work is in surfacing Application-Credential-specific validation conditions on theOpenstackCredsresource and documenting the operator workflow.Scope
clientconfigcorrectly constructsgophercloud.AuthOptionswithApplicationCredentialID/ApplicationCredentialSecretwhenauth_type: v3applicationcredentialis set.k8s/migration/pkg/utils/credutils.goto:expires_atviaapplicationcredentials.Get(...)after successful auth; populateExpiringandExpiredConditions per the contract from Accept clouds.yaml in OpenstackCreds Secret #1952.CredentialsValidated=False, Reason=CredentialInvalidOrRevokedRolesSufficient=False, Reason=InsufficientRoleswith role names extracted from the response body when availableReason=KeystoneUnreachableReason=TLSVerificationFailedOpenstackCredsControllerto populateExpiring/Expired/RolesSufficientConditions per reconcile pass; rely on the periodic 1-hour requeue scheduled in Accept clouds.yaml in OpenstackCreds Secret #1952 for time-based transitions.docs/credentials.mdcovering:openstack application credential create ...)memberplus thevjailbreak-migratorrole covering Cinder scheduler-stats and Nova hypervisor read)Acceptance criteria
clouds.yamlwithauth_type: v3applicationcredentialauthenticates successfully (no username/password required).expires_atis in the past →Expired=True. Within 7 days →Expiring=True, Reason=Within7Days. Within 30 days →Within30Days. Beyond 30 days →Expiring=False.CredentialsValidated=False, Reason=CredentialInvalidOrRevokedon next reconcile.RolesSufficient=False, Reason=InsufficientRoles; missing role names listed in the condition message when Keystone provides them.member+ custom role.docs/credentials.md"Application Credentials (recommended)" section published, including the explicit role set enumeration.Open questions for maintainers
docs/credentials.md(created in Accept clouds.yaml in OpenstackCreds Secret #1952) versus a dedicateddocs/application-credentials.md. Recommend the former for discoverability.Branch name
1953-clouds-yaml-app-credentials(matches repo convention); branched offmainafter #1952 merges.