Questions tagged [common-expression-language]

For questions regarding Google's "Common Expression Language", often abbreviated CEL.

From the README:

The Common Expression Language (CEL) is a non-Turing complete language designed for simplicity, speed, safety, and portability. CEL's C-like syntax looks nearly identical to equivalent expressions in C++, Go, Java, and TypeScript.

Refer also to the github page.

CEL is used in Google's Certificate Authority Service.

11 questions
3
votes
2 answers

Example to find a value in a list using common expression language (CEL)

I was following google common expression language specification, can some one guide me if i could do something like this: I need to write an expression to find if "345" is in the phone_numbers list using google CEL . json : {"phone_numbers":…
1
vote
0 answers

How to get a principal's role(s) using Common Expression Language?

I am trying to create a deny policy with terraform to limit the power of the Roles I made in GCP IAM. The thing is that deny policies in terraform are tied to principals (users/groups of users), not roles. I wanted to know if there was a way to use…
0
votes
1 answer

CEL Code Issues - Google Workspace Context-Aware

I am currently attempting to create a Context-Aware security rule in Google Workspace that would potentially block users from accessing Google apps if they are under iOS version 15.0.0. I would like to achieve this using CEL (common expressive…
0
votes
0 answers

Common Expression Language in Workload Identity Federation of GitHub Actions not working as expected

I am using a CEL expression for setting conditions on the Service Account usage of a Workload Identity Federation provider for GitHub Actions. Here is the expression (assertion.repository=='MyOrg/MyRepo' && (assertion.event_name=='pull_request' ||…
0
votes
0 answers

Check for secretmanager resource labels on condition?

Since secretmanager.googleapis.com/Secret or secretmanager.googleapis.com/SecretVersion doesn't allow attaching tags, thus not allowing resource.matchTag to be used as a IAM condition, I was hoping to be able to check for the existing labels (or…
0
votes
2 answers

Firestore and custom claims - docId not interpreted as a string?

I am using custom claims to grant access to firestore. I have it set already on the user, like so. admin.auth().setCustomUserClaims( userId, {[myId123]:true}) Now I'm trying to write a rule to allow access. Here's what I have written. match…
esafresa
  • 480
  • 7
  • 19
0
votes
1 answer

writing Firebase rules

I am a novice using Firebase for first time and received an email regarding my information in database is completely open in internet and vulnerable to attackers and need to write a rule. But the rule I have published is not what I am after. I am…
0
votes
2 answers

Azure Data factory expression

i saw this expression in one of the Pipeine , in the filter activity condition. can anyone help me understad this expresson used( you can refrase inorder to make it understandable). looks difficult to…
0
votes
0 answers

Not able to figure out Common Expression Language conditional statement

I have a Common Expression Language (CEL) expression as below request.headers['host'].lower().contains('test.example.com') Now above expression make sure the HTTP host header matches test.example.com domain. Now how to create a expression that will…
Piyush Patil
  • 14,512
  • 6
  • 35
  • 54
0
votes
1 answer

User or condition in common expression language for workload identity federation condition

I am trying to set up a Workload Identity Federation auth in my GCP org. I want to restrict the access by leveraging attribute_conditions in order for some repos and some branches to have access to the corresponding permissions to be provided by the…
-1
votes
1 answer

Security rules for cloud firestore (CEL)

guys, can any one tell me in security rules for cloud firestore where i can see all methods to validate data using common expression language(CEL) like (hasOnly(),hasAll(),isNumber) common expression language methods or functions.