Skip to content

Commit

Permalink
remove GenerateJWTPermissions as it isn't used anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
roncodingenthusiast committed Jul 14, 2023
1 parent 00d045c commit 0d087be
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions agent/xds/rbac.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0d087be

Please sign in to comment.