From 0d087bee978fb3f6136c7bdb4568ab95acaacebd Mon Sep 17 00:00:00 2001 From: Ronald Ekambi Date: Thu, 13 Jul 2023 22:51:22 -0400 Subject: [PATCH] remove GenerateJWTPermissions as it isn't used anymore --- agent/xds/rbac.go | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/agent/xds/rbac.go b/agent/xds/rbac.go index 2915afdfa4e1..edf6b35ad851 100644 --- a/agent/xds/rbac.go +++ b/agent/xds/rbac.go @@ -222,28 +222,6 @@ func removePermissionPrecedence(perms []*rbacPermission, intentionDefaultAction return out } -func (p *rbacPermission) GenerateJWTPermissions() *envoy_rbac_v3.Permission { - if len(p.jwtInfos) == 0 { - return p.ComputedPermission - } - - var jwtPerms []*envoy_rbac_v3.Permission - - for _, info := range p.jwtInfos { - payloadKey := buildPayloadInMetadataKey(info.Provider.Name) - claimsPermission := jwtInfosToPermission(info.Provider.VerifyClaims, payloadKey) - issuerPermission := segmentToPermission(pathToSegments([]string{"iss"}, payloadKey), info.Issuer) - - perm := andPermissions([]*envoy_rbac_v3.Permission{ - issuerPermission, claimsPermission, - }) - jwtPerms = append(jwtPerms, perm) - } - - jwtPerm := orPermissions(jwtPerms) - return andPermissions([]*envoy_rbac_v3.Permission{p.ComputedPermission, jwtPerm}) -} - func intentionToIntermediateRBACForm( ixn *structs.Intention, localInfo rbacLocalInfo,