@@ -590,10 +590,10 @@ func TestImpersonationProxy(t *testing.T) { //nolint:gocyclo // yeah, it's compl
590590 // this user is not allowed to impersonate other users
591591 require .True (t , apierrors .IsForbidden (err ), err )
592592 require .EqualError (t , err , fmt .Sprintf (
593- `users "other-user-to-impersonate " is forbidden: ` +
594- `User "%s" cannot impersonate resource "users " in API group "" at the cluster scope : ` +
593+ `secrets "%s " is forbidden: ` +
594+ `User "%s" cannot impersonate-on:user-info:get resource "secrets " in API group "" in the namespace "%s" : ` +
595595 `decision made by impersonation-proxy.concierge.pinniped.dev` ,
596- env .TestUser .ExpectedUsername ))
596+ impersonationProxyTLSSecretName ( env ), env .TestUser .ExpectedUsername , env . ConciergeNamespace ))
597597
598598 // impersonate the GC service account instead which can read anything (the binding to edit allows this)
599599 nestedImpersonationClientAsSA , credentialsAsSA := newImpersonationProxyClient (t , impersonationProxyURL , impersonationProxyCACertPEM ,
@@ -778,7 +778,7 @@ func TestImpersonationProxy(t *testing.T) { //nolint:gocyclo // yeah, it's compl
778778 })
779779
780780 _ , errUID := testlib .NewKubeclient (t , nestedImpersonationUIDOnly ).Kubernetes .CoreV1 ().Secrets ("foo" ).Get (ctx , "bar" , metav1.GetOptions {})
781- msg := `requested [{UID some-awesome-uid authentication.k8s.io/v1 }] without impersonating a user`
781+ msg := `requested &user.DefaultInfo{Name:"", UID:" some-awesome-uid", Groups:[]string(nil), Extra:map[string][]string(nil)} without impersonating a user name `
782782 require .EqualError (t , errUID , msg )
783783 require .True (t , apierrors .IsBadRequest (errUID ), errUID ) // starting in k8s 1.35 libs, this was changed from internal error to bad request
784784 require .Equal (t , & apierrors.StatusError {
@@ -837,10 +837,10 @@ func TestImpersonationProxy(t *testing.T) { //nolint:gocyclo // yeah, it's compl
837837 // this SA is not yet allowed to impersonate SAs
838838 require .True (t , apierrors .IsForbidden (err ), err )
839839 require .EqualError (t , err , fmt .Sprintf (
840- `serviceaccounts "root-ca-cert-publisher" is forbidden: ` +
841- `User "%s" cannot impersonate resource "serviceaccounts " in API group "" in the namespace "kube-system" : ` +
840+ `whoamirequests.identity.concierge.%s is forbidden: ` +
841+ `User "%s" cannot impersonate-on:serviceaccount:create resource "whoamirequests " in API group "identity.concierge.%s" at the cluster scope : ` +
842842 `decision made by impersonation-proxy.concierge.pinniped.dev` ,
843- serviceaccount .MakeUsername (namespaceName , saName )))
843+ env . APIGroupSuffix , serviceaccount .MakeUsername (namespaceName , saName ), env . APIGroupSuffix ))
844844
845845 // webhook authorizer deny cache TTL is 10 seconds so we need to wait long enough for it to drain
846846 time .Sleep (15 * time .Second )
0 commit comments