Skip to content

Commit f70bfe9

Browse files
committed
Application Credential support
Signed-off-by: Veronika Fisarova <[email protected]>
1 parent 94a5417 commit f70bfe9

File tree

11 files changed

+306
-27
lines changed

11 files changed

+306
-27
lines changed

api/go.mod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/onsi/ginkgo/v2 v2.20.1
77
github.com/onsi/gomega v1.34.1
88
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250909143828-e33d35ffd64f
9-
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250730071847-837b07f8d72f
9+
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250823121217-7e1cd2e3dd03
1010
k8s.io/api v0.29.15
1111
k8s.io/apimachinery v0.29.15
1212
k8s.io/client-go v0.29.15
@@ -76,3 +76,5 @@ require (
7676
// mschuppert: map to latest commit from release-4.16 tag
7777
// must consistent within modules and service operators
7878
replace github.com/openshift/api => github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094 //allow-merging
79+
80+
replace github.com/openstack-k8s-operators/keystone-operator/api => github.com/Deydra71/keystone-operator/api v0.0.0-20250917105136-16823a8f6c57

api/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k=
7474
github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY=
7575
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250909143828-e33d35ffd64f h1:chuu4iBT5sXHYw8aPeP/pWC+S3yGo6hdy39foP7c5vs=
7676
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250909143828-e33d35ffd64f/go.mod h1:Dv8qpmBIQy3Jv/EyQnOyc0w61X8vyfxpjcIQONP5CwY=
77-
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250730071847-837b07f8d72f h1:DW8aNjEtDFrWiZ6vWuOXwdRB4eBD0n+bA9foQkOEx6U=
78-
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250730071847-837b07f8d72f/go.mod h1:P+7F1wiwZUxOy4myYXFyc/uBtGATDFpk3yAllXe1Vzk=
77+
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250823121217-7e1cd2e3dd03 h1:9VanDdvg1APf9B1nzGElLvWr6dM5GsSayMLSV/nJZnE=
78+
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250823121217-7e1cd2e3dd03/go.mod h1:Z+rmtn3qhuPZfx2EDVmloUh2MkYbvDMgcpJneRYerS0=
7979
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
8080
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
8181
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=

config/rbac/role.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ rules:
1616
- patch
1717
- update
1818
- watch
19+
- apiGroups:
20+
- ""
21+
resources:
22+
- secrets
23+
verbs:
24+
- get
25+
- list
26+
- watch
1927
- apiGroups:
2028
- ""
2129
resources:
@@ -211,6 +219,14 @@ rules:
211219
- get
212220
- list
213221
- watch
222+
- apiGroups:
223+
- keystone.openstack.org
224+
resources:
225+
- keystoneapplicationcredentials
226+
verbs:
227+
- get
228+
- list
229+
- watch
214230
- apiGroups:
215231
- keystone.openstack.org
216232
resources:

controllers/barbican_controller.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ func (r *BarbicanReconciler) GetLogger(ctx context.Context) logr.Logger {
9999
//+kubebuilder:rbac:groups=keystone.openstack.org,resources=keystoneapis,verbs=get;list;watch;
100100
//+kubebuilder:rbac:groups=keystone.openstack.org,resources=keystoneservices,verbs=get;list;watch;create;update;patch;delete;
101101
//+kubebuilder:rbac:groups=keystone.openstack.org,resources=keystoneendpoints,verbs=get;list;watch;create;update;patch;delete;
102+
//+kubebuilder:rbac:groups=keystone.openstack.org,resources=keystoneapplicationcredentials,verbs=get;list;watch
102103
//+kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete;
103104
//+kubebuilder:rbac:groups=core,resources=secrets,verbs=get;list;watch;create;update;patch;delete;
104105
//+kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create;update;patch;delete;
@@ -113,6 +114,7 @@ func (r *BarbicanReconciler) GetLogger(ctx context.Context) logr.Logger {
113114

114115
// service account, role, rolebinding
115116
//+kubebuilder:rbac:groups="",resources=serviceaccounts,verbs=get;list;watch;create;update;patch
117+
//+kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch
116118
//+kubebuilder:rbac:groups="rbac.authorization.k8s.io",resources=roles,verbs=get;list;watch;create;update;patch
117119
//+kubebuilder:rbac:groups="rbac.authorization.k8s.io",resources=rolebindings,verbs=get;list;watch;create;update;patch
118120
//+kubebuilder:rbac:groups="security.openshift.io",resourceNames=anyuid,resources=securitycontextconstraints,verbs=use
@@ -709,6 +711,18 @@ func (r *BarbicanReconciler) generateServiceConfig(
709711
"EnableSecureRBAC": instance.Spec.BarbicanAPI.EnableSecureRBAC,
710712
}
711713

714+
templateParameters["UseApplicationCredentials"] = false
715+
// Try to get Application Credential for this service (via keystone api helper)
716+
if acData, err := keystonev1.GetApplicationCredentialFromSecret(ctx, r.Client, instance.Namespace, barbican.ServiceName); err != nil {
717+
Log.Error(err, "Failed to get ApplicationCredential for service", "service", barbican.ServiceName)
718+
return err
719+
} else if acData != nil {
720+
templateParameters["UseApplicationCredentials"] = true
721+
templateParameters["ACID"] = acData.ID
722+
templateParameters["ACSecret"] = acData.Secret
723+
Log.Info("Using ApplicationCredentials auth", "service", barbican.ServiceName)
724+
}
725+
712726
// To avoid a json parsing error in kolla files, we always need to set PKCS11ClientDataPath
713727
// This gets overridden in the PKCS11 section below if needed.
714728
templateParameters["PKCS11ClientDataPath"] = barbicanv1beta1.DefaultPKCS11ClientDataPath

controllers/barbicanapi_controller.go

Lines changed: 131 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,11 @@ func (r *BarbicanAPIReconciler) reconcileNormal(ctx context.Context, instance *b
617617

618618
Log.Info(fmt.Sprintf("[API] Got secrets '%s'", instance.Name))
619619

620+
// Verify Application Credentials if available
621+
if res, err := r.verifyApplicationCredentials(ctx, helper, instance, &configVars); err != nil || res.RequeueAfter > 0 {
622+
return res, err
623+
}
624+
620625
//
621626
// TLS input validation
622627
//
@@ -1007,6 +1012,42 @@ func (r *BarbicanAPIReconciler) SetupWithManager(mgr ctrl.Manager) error {
10071012
return err
10081013
}
10091014

1015+
// Application Credential secret watching function
1016+
acSecretFn := func(_ context.Context, o client.Object) []reconcile.Request {
1017+
name := o.GetName()
1018+
ns := o.GetNamespace()
1019+
result := []reconcile.Request{}
1020+
1021+
// Only handle Secret objects
1022+
if _, isSecret := o.(*corev1.Secret); !isSecret {
1023+
return nil
1024+
}
1025+
1026+
// Check if this is a barbican AC secret by name pattern (ac-barbican-secret)
1027+
expectedSecretName := keystonev1.GetACSecretName("barbican")
1028+
if name == expectedSecretName {
1029+
// get all BarbicanAPI CRs in this namespace
1030+
barbicanAPIs := &barbicanv1beta1.BarbicanAPIList{}
1031+
listOpts := []client.ListOption{
1032+
client.InNamespace(ns),
1033+
}
1034+
if err := r.Client.List(context.Background(), barbicanAPIs, listOpts...); err != nil {
1035+
return nil
1036+
}
1037+
1038+
// Enqueue reconcile for all barbican API instances
1039+
for _, cr := range barbicanAPIs.Items {
1040+
objKey := client.ObjectKey{
1041+
Namespace: ns,
1042+
Name: cr.Name,
1043+
}
1044+
result = append(result, reconcile.Request{NamespacedName: objKey})
1045+
}
1046+
}
1047+
1048+
return result
1049+
}
1050+
10101051
return ctrl.NewControllerManagedBy(mgr).
10111052
For(&barbicanv1beta1.BarbicanAPI{}).
10121053
Owns(&corev1.Service{}).
@@ -1018,9 +1059,12 @@ func (r *BarbicanAPIReconciler) SetupWithManager(mgr ctrl.Manager) error {
10181059
handler.EnqueueRequestsFromMapFunc(r.findObjectsForSrc),
10191060
builder.WithPredicates(predicate.ResourceVersionChangedPredicate{}),
10201061
).
1062+
Watches(&corev1.Secret{},
1063+
handler.EnqueueRequestsFromMapFunc(acSecretFn)).
10211064
Watches(&topologyv1.Topology{},
10221065
handler.EnqueueRequestsFromMapFunc(r.findObjectsForSrc),
1023-
builder.WithPredicates(predicate.GenerationChangedPredicate{})).
1066+
builder.WithPredicates(predicate.GenerationChangedPredicate{}),
1067+
).
10241068
Complete(r)
10251069
}
10261070

@@ -1057,3 +1101,89 @@ func (r *BarbicanAPIReconciler) findObjectsForSrc(ctx context.Context, src clien
10571101

10581102
return requests
10591103
}
1104+
1105+
// verifyApplicationCredentials handles Application Credentials validation
1106+
// It only uses AC if it's in a complete/ready state, otherwise continues with password auth
1107+
func (r *BarbicanAPIReconciler) verifyApplicationCredentials(
1108+
ctx context.Context,
1109+
_ *helper.Helper,
1110+
instance *barbicanv1beta1.BarbicanAPI,
1111+
configVars *map[string]env.Setter,
1112+
) (ctrl.Result, error) {
1113+
log := r.GetLogger(ctx)
1114+
1115+
// Check for Application Credential - only use it if it's fully ready
1116+
acName := fmt.Sprintf("ac-%s", barbican.ServiceName)
1117+
ac := &keystonev1.KeystoneApplicationCredential{}
1118+
1119+
if err := r.Client.Get(ctx, client.ObjectKey{Namespace: instance.Namespace, Name: acName}, ac); err == nil {
1120+
// AC CR exists - check if it's in ready state
1121+
if r.isACReady(ctx, ac) {
1122+
// AC is ready - add it to configVars for hash tracking
1123+
secretKey := types.NamespacedName{Namespace: instance.Namespace, Name: ac.Status.SecretName}
1124+
hash, res, err := secret.VerifySecret(
1125+
ctx,
1126+
secretKey,
1127+
[]string{"AC_ID", "AC_SECRET"},
1128+
r.Client,
1129+
10*time.Second,
1130+
)
1131+
if err != nil {
1132+
log.Info("ApplicationCredential secret verification failed, continuing with password auth", "error", err.Error())
1133+
} else if res.RequeueAfter > 0 {
1134+
return res, nil
1135+
} else {
1136+
// AC is ready and verified - add to configVars for change tracking
1137+
(*configVars)["secret-"+ac.Status.SecretName] = env.SetValue(hash)
1138+
log.Info("Using ApplicationCredential authentication")
1139+
}
1140+
} else {
1141+
// AC exists but not ready - wait for it
1142+
log.Info("ApplicationCredential exists but not ready, waiting")
1143+
instance.Status.Conditions.Set(condition.FalseCondition(
1144+
condition.InputReadyCondition,
1145+
condition.RequestedReason,
1146+
condition.SeverityInfo,
1147+
condition.InputReadyWaitingMessage))
1148+
return ctrl.Result{RequeueAfter: time.Duration(10) * time.Second}, nil
1149+
}
1150+
} else if !k8s_errors.IsNotFound(err) {
1151+
return ctrl.Result{}, err
1152+
}
1153+
1154+
return ctrl.Result{}, nil
1155+
}
1156+
1157+
// isACReady checks if ApplicationCredential is in a ready state with all required components
1158+
func (r *BarbicanAPIReconciler) isACReady(ctx context.Context, ac *keystonev1.KeystoneApplicationCredential) bool {
1159+
log := r.GetLogger(ctx)
1160+
1161+
// Check if AC has completed setup (secret name is populated)
1162+
if ac.Status.SecretName == "" {
1163+
log.V(1).Info("AC not ready: SecretName not populated", "ac", ac.Name)
1164+
return false
1165+
}
1166+
1167+
secret := &corev1.Secret{}
1168+
secretKey := types.NamespacedName{Namespace: ac.Namespace, Name: ac.Status.SecretName}
1169+
if err := r.Client.Get(ctx, secretKey, secret); err != nil {
1170+
log.V(1).Info("AC not ready: Secret not found", "secret", secretKey, "error", err)
1171+
return false
1172+
}
1173+
1174+
acID, acIDExists := secret.Data["AC_ID"]
1175+
acSecret, acSecretExists := secret.Data["AC_SECRET"]
1176+
1177+
if !acIDExists || !acSecretExists {
1178+
log.V(1).Info("AC not ready: Missing required fields", "secret", secretKey)
1179+
return false
1180+
}
1181+
1182+
if len(acID) == 0 || len(acSecret) == 0 {
1183+
log.V(1).Info("AC not ready: Empty required fields", "secret", secretKey)
1184+
return false
1185+
}
1186+
1187+
log.V(1).Info("AC is ready", "secret", secretKey)
1188+
return true
1189+
}

controllers/barbicankeystonelistener_controller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ import (
2727
"github.com/openstack-k8s-operators/barbican-operator/pkg/barbican"
2828
"github.com/openstack-k8s-operators/barbican-operator/pkg/barbicankeystonelistener"
2929
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
30-
31-
// keystonev1 "github.com/openstack-k8s-operators/keystone-operator/api/v1beta1"
3230
"github.com/openstack-k8s-operators/lib-common/modules/common"
3331
"github.com/openstack-k8s-operators/lib-common/modules/common/condition"
3432
"github.com/openstack-k8s-operators/lib-common/modules/common/deployment"
@@ -730,8 +728,10 @@ func (r *BarbicanKeystoneListenerReconciler) SetupWithManager(mgr ctrl.Manager)
730728
).
731729
Watches(&topologyv1.Topology{},
732730
handler.EnqueueRequestsFromMapFunc(r.findObjectsForSrc),
733-
builder.WithPredicates(predicate.GenerationChangedPredicate{})).
731+
builder.WithPredicates(predicate.GenerationChangedPredicate{}),
732+
).
734733
Complete(r)
734+
735735
}
736736

737737
func (r *BarbicanKeystoneListenerReconciler) findObjectsForSrc(ctx context.Context, src client.Object) []reconcile.Request {

controllers/barbicanworker_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,8 @@ func (r *BarbicanWorkerReconciler) SetupWithManager(mgr ctrl.Manager) error {
752752
).
753753
Watches(&topologyv1.Topology{},
754754
handler.EnqueueRequestsFromMapFunc(r.findObjectsForSrc),
755-
builder.WithPredicates(predicate.GenerationChangedPredicate{})).
755+
builder.WithPredicates(predicate.GenerationChangedPredicate{}),
756+
).
756757
Complete(r)
757758
}
758759

go.mod

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ require (
1010
github.com/onsi/gomega v1.34.1
1111
github.com/openstack-k8s-operators/barbican-operator/api v0.0.0-00010101000000-000000000000
1212
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250909143828-e33d35ffd64f
13-
github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20250818180001-057253e3d233
14-
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250730071847-837b07f8d72f
15-
github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250730071847-837b07f8d72f
16-
github.com/openstack-k8s-operators/lib-common/modules/test v0.6.1-0.20250730071847-837b07f8d72f
17-
github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20250819151523-e1c898c710cb
13+
github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20250802061907-896a24e4fc36
14+
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250823121217-7e1cd2e3dd03
15+
github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250823121217-7e1cd2e3dd03
16+
github.com/openstack-k8s-operators/lib-common/modules/test v0.6.1-0.20250823121217-7e1cd2e3dd03
17+
github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20250908160950-4fa28a6f127d
1818
go.uber.org/zap v1.27.0
1919
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
2020
k8s.io/api v0.29.15
@@ -52,7 +52,7 @@ require (
5252
github.com/modern-go/reflect2 v1.0.2 // indirect
5353
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
5454
github.com/openshift/api v3.9.0+incompatible // indirect
55-
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20250730071847-837b07f8d72f // indirect
55+
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20250823121217-7e1cd2e3dd03 // indirect
5656
github.com/pkg/errors v0.9.1 // indirect
5757
github.com/prometheus/client_golang v1.19.0 // indirect
5858
github.com/prometheus/client_model v0.6.0 // indirect
@@ -92,3 +92,5 @@ replace github.com/openshift/api => github.com/openshift/api v0.0.0-202408300231
9292

9393
// custom RabbitmqClusterSpecCore for OpenStackControlplane (v2.6.0_patches_tag)
9494
replace github.com/rabbitmq/cluster-operator/v2 => github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20250717122149-12f70b7f3d8d //allow-merging
95+
96+
replace github.com/openstack-k8s-operators/keystone-operator/api => github.com/Deydra71/keystone-operator/api v0.0.0-20250917105136-16823a8f6c57

go.sum

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
github.com/Deydra71/keystone-operator/api v0.0.0-20250917105136-16823a8f6c57 h1:lSAuYrWIk0N35yDiPWrvpsIPhwk57Fwg7T648kimsOo=
2+
github.com/Deydra71/keystone-operator/api v0.0.0-20250917105136-16823a8f6c57/go.mod h1:7ZuNZNtwRYklS2H5E5YSjsHOI2sYbAl1AD+N0W/G+8A=
13
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
24
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
35
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
@@ -80,18 +82,16 @@ github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094 h1:J1wuGhVxpsHykZBa6
8082
github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094/go.mod h1:CxgbWAlvu2iQB0UmKTtRu1YfepRg1/vJ64n2DlIEVz4=
8183
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250909143828-e33d35ffd64f h1:chuu4iBT5sXHYw8aPeP/pWC+S3yGo6hdy39foP7c5vs=
8284
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250909143828-e33d35ffd64f/go.mod h1:Dv8qpmBIQy3Jv/EyQnOyc0w61X8vyfxpjcIQONP5CwY=
83-
github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20250818180001-057253e3d233 h1:1Kuny36wIpijE4RsFu8e+b0uUK8Gh0PgvlEVOOhG+uo=
84-
github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20250818180001-057253e3d233/go.mod h1:qevkmDP/Yr7FTM0ZVe2fABjSjrfkkdZkYeMho71OVG0=
85-
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250730071847-837b07f8d72f h1:DW8aNjEtDFrWiZ6vWuOXwdRB4eBD0n+bA9foQkOEx6U=
86-
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250730071847-837b07f8d72f/go.mod h1:P+7F1wiwZUxOy4myYXFyc/uBtGATDFpk3yAllXe1Vzk=
87-
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20250730071847-837b07f8d72f h1:nGYLHcpM7EjiSzN4bmiLZbxty9u0k0Qzvkqn+1s1TF0=
88-
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20250730071847-837b07f8d72f/go.mod h1:nachFP0Yicw/e8ZlqZzvnBN6w9kjMcnqrhaDw36PGjw=
89-
github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250730071847-837b07f8d72f h1:/e/jQu3GThcystmZFyzlQq6nOKpORQq84HhcbkKxAq4=
90-
github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250730071847-837b07f8d72f/go.mod h1:U3LQ4Nz2+syTPfW66bSLv6OzefLpsqxWLdX9AFotRPA=
91-
github.com/openstack-k8s-operators/lib-common/modules/test v0.6.1-0.20250730071847-837b07f8d72f h1:r4WiIm2JdcSY7RTWsv008d45bwQl3qTfjd4B2k2fpL0=
92-
github.com/openstack-k8s-operators/lib-common/modules/test v0.6.1-0.20250730071847-837b07f8d72f/go.mod h1:L3t8ty8BYur+yQC4EbxolVOU85A62oxODM5rMApOwfc=
93-
github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20250819151523-e1c898c710cb h1:10W54mDBhON+L5PItSHV3ahOAmZH3Xi4dvEK5yhNLRE=
94-
github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20250819151523-e1c898c710cb/go.mod h1:0dWVKC1svlk2h+vyJGlKDcwgq4yJaovKXBhGZNi5tQ0=
85+
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250823121217-7e1cd2e3dd03 h1:9VanDdvg1APf9B1nzGElLvWr6dM5GsSayMLSV/nJZnE=
86+
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250823121217-7e1cd2e3dd03/go.mod h1:Z+rmtn3qhuPZfx2EDVmloUh2MkYbvDMgcpJneRYerS0=
87+
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20250823121217-7e1cd2e3dd03 h1:tSMLVApQ4j4YJ56TGIYzaNo2Zh/ruDAY0wCcOEVKoIQ=
88+
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20250823121217-7e1cd2e3dd03/go.mod h1:nachFP0Yicw/e8ZlqZzvnBN6w9kjMcnqrhaDw36PGjw=
89+
github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250823121217-7e1cd2e3dd03 h1:DrKbzsweRx8VBNb5ur+/XcHSi+MR3VdzCsIEXYGc5SM=
90+
github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250823121217-7e1cd2e3dd03/go.mod h1:U3LQ4Nz2+syTPfW66bSLv6OzefLpsqxWLdX9AFotRPA=
91+
github.com/openstack-k8s-operators/lib-common/modules/test v0.6.1-0.20250823121217-7e1cd2e3dd03 h1:PEDnEmWK80W8PdsQUX+z42ScN0i/EA5gDE44ya6VUGw=
92+
github.com/openstack-k8s-operators/lib-common/modules/test v0.6.1-0.20250823121217-7e1cd2e3dd03/go.mod h1:L3t8ty8BYur+yQC4EbxolVOU85A62oxODM5rMApOwfc=
93+
github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20250908160950-4fa28a6f127d h1:0iy250ctORDakbio6uSKHFNV6qvAGTyFy2j9PMF9MlA=
94+
github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20250908160950-4fa28a6f127d/go.mod h1:2I8YZyKvq2ACOnIBFpdUd9TdIaI2yeDu/9VC0HRDfPo=
9595
github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20250717122149-12f70b7f3d8d h1:0KCWljk2IEJ+aWNK+RiGpIdu51KPXrYA5RfyUcV4Mb4=
9696
github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20250717122149-12f70b7f3d8d/go.mod h1:6Mq2N/KtNFW20L+PQC5qkeK8R8UGadmGBXL8HDY6lcg=
9797
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=

templates/barbican/config/00-default.conf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,20 @@ connection={{ .DatabaseConnection }}
1414
[keystone_authtoken]
1515
auth_version = v3
1616
auth_url={{ .KeystoneAuthURL }}
17-
auth_type=password
17+
auth_type = {{ if .UseApplicationCredentials }}v3applicationcredential{{ else }}password{{ end }}
18+
19+
{{ if .UseApplicationCredentials -}}
20+
application_credential_id = {{ .ACID }}
21+
application_credential_secret = {{ .ACSecret }}
22+
{{- else -}}
1823
username={{ .ServiceUser }}
1924
user_domain_name=Default
2025
password = {{ .ServicePassword }}
2126
project_name=service
2227
project_domain_name=Default
2328
interface = internal
2429
{{- end }}
30+
{{- end }}
2531

2632
[oslo_messaging_notifications]
2733
driver=messagingv2

0 commit comments

Comments
 (0)