Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for entity tags #238

Merged

Conversation

mark-creamer-amazon
Copy link
Contributor

Use Case

Entity tagging is new in Cedar 4.2.x, but CedarJava 4.2.x is not able to leverage it with the current Entity object and serializer.

Details

  • Adding tags field to Entity.java to support entities with tags
  • Updated EntitySerializer.java to make sure the tags field makes it across the JNI layer and into the AuthorizationRequest string we pass.
  • Quality of life improvement: returning the error message in the case of Validation errors in the corpus/json tests in executeJsonValidationTest

Testing

  • Added testEntityWithUnknownTag to EntityValidationTests.java
  • Created a temporary extra json test among JSON_TEST_FILES that tested e2e allowing an action contingent on a tag being present in the resource.

@cdisselkoen cdisselkoen merged commit 4df157d into cedar-policy:release/4.2.x Oct 16, 2024
4 checks passed
@cdisselkoen
Copy link
Contributor

Can we make sure to make the same change on main as well?

@mark-creamer-amazon
Copy link
Contributor Author

Can we make sure to make the same change on main as well?

Created here: #239

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants