diff --git a/service/kas/access/accessPdp.go b/service/kas/access/accessPdp.go index 4b4b72713..59b7fd84e 100644 --- a/service/kas/access/accessPdp.go +++ b/service/kas/access/accessPdp.go @@ -15,11 +15,11 @@ const ( ) func (p *Provider) canAccess(ctx context.Context, token *authorization.Token, policy Policy) (bool, error) { - if len(policy.Body.Dissem) > 0 { + if policy.Body.Dissem != nil && len(policy.Body.Dissem) > 0 { // TODO: Move dissems check to the getdecisions endpoint p.Logger.Error("Dissems check is not enabled in v2 platform kas") } - if policy.Body.DataAttributes != nil { + if policy.Body.DataAttributes != nil && len(policy.Body.DataAttributes) > 0 { attrAccess, err := p.checkAttributes(ctx, policy.Body.DataAttributes, token) if err != nil { return false, err