Skip to content

How to blow up in access_policy if security_context does not have specified member? #9048

@mzealey

Description

@mzealey

I'm building an access_policy approach as per:

filters:
- member: "{CUBE}.city"
operator: equals
values: ["{ security_context.auth.userAttributes.city }"]

It's a great feature and will massively simplify our config because different tables have different RBAC from the token. However (and I'd imagine it's quite a common case - hence raising it here), we need to blow up if the given security_context does not have the specified attribute. If it's a nested attribute then this will blow up correctly (as dereferencing an undefined object), however if it's just security_context.xxx it will interpolate as undefined.

Metadata

Metadata

Assignees

Labels

questionThe issue is a question. Please use Stack Overflow for questions.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions