Conversation
Co-authored-by: Maria Ines Parnisari <maria.inesparnisari@okta.com>
make CheckError types snake case
The old one has been deprecated and is causing CI errors as can be seen here: https://github.com/openfga/api/actions/runs/12349913805/job/34484604530?pr=211
* Add name as a filter for ListStores * Add validation and openapi annotations * Skip validation on empty name * Add description
* add pattern restriction on continuation_tokens * update continuation_token regex to be specific to url base64
* chore: remove lingering comment in proto defn * fix regex pattern to allow empty continuation token
…oto (#178) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.64.0 to 1.64.1. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](grpc/grpc-go@v1.64.0...v1.64.1) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…dates (#217) Bumps the dependencies group with 3 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) and [swaggerexpert/swagger-editor-validate](https://github.com/swaggerexpert/swagger-editor-validate). Updates `actions/checkout` from 4.1.3 to 4.2.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@1d96c77...11bd719) Updates `bufbuild/buf-setup-action` from 1.34.0 to 1.48.0 - [Release notes](https://github.com/bufbuild/buf-setup-action/releases) - [Commits](bufbuild/buf-setup-action@35c243d...1115d0a) Updates `swaggerexpert/swagger-editor-validate` from 1.4.1 to 1.4.2 - [Release notes](https://github.com/swaggerexpert/swagger-editor-validate/releases) - [Commits](swaggerexpert/swagger-editor-validate@db517d5...e8e51db) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dependencies - dependency-name: bufbuild/buf-setup-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dependencies - dependency-name: swaggerexpert/swagger-editor-validate dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Add regex to assert that read API's user field (if specified) must have both type and object. Close openfga/openfga#2189
* fix(api): add max 50 batch check by default note * comment fix * after daniel review * add spacing
) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.26.0 to 0.36.0. - [Commits](golang/net@v0.26.0...v0.36.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* "chore: updating SECURITY-INSIGHTS" * "chore: updating SECURITY-INSIGHTS" * "chore: updating SECURITY-INSIGHTS" * "chore: updating SECURITY-INSIGHTS" * "chore: updating SECURITY-INSIGHTS" * "chore: updating SECURITY-INSIGHTS" * "chore: updating SECURITY-INSIGHTS" * "chore: updating SECURITY-INSIGHTS"
…dates (#223) Bumps the dependencies group with 2 updates in the / directory: [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) and [swaggerexpert/swagger-editor-validate](https://github.com/swaggerexpert/swagger-editor-validate). Updates `bufbuild/buf-setup-action` from 1.48.0 to 1.50.0 - [Release notes](https://github.com/bufbuild/buf-setup-action/releases) - [Commits](bufbuild/buf-setup-action@1115d0a...a47c93e) Updates `swaggerexpert/swagger-editor-validate` from 1.4.2 to 1.5.1 - [Release notes](https://github.com/swaggerexpert/swagger-editor-validate/releases) - [Commits](swaggerexpert/swagger-editor-validate@e8e51db...264fd87) --- updated-dependencies: - dependency-name: bufbuild/buf-setup-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dependencies - dependency-name: swaggerexpert/swagger-editor-validate dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ncies group (#230) chore(deps): bump actions/checkout in the dependencies group Bumps the dependencies group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.2.2 to 4.3.0 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@11bd719...08eba0b) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 4.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ons (#233) * OpenFGA API Protobuf for Idempotent Writes * Update openfga/v1/openfga_service.proto Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * CodeReview fixes * CodeReview fixes * changing on_missing and on_duplicate to string value instead of Enum for proper JSON values * Make sure on_duplicate, on_missing are optional params --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…ncies group (#232) chore(deps): bump actions/checkout in the dependencies group Bumps the dependencies group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.3.0 to 5.0.0 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@08eba0b...08c6903) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(docs): update README
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughAdds a new AuthZen gRPC/REST API: service definition, domain messages, batch evaluation semantics, search endpoints, PDP configuration discovery, OpenAPI documentation, and a README note marking the API as experimental. Changes
Sequence DiagramsequenceDiagram
participant Client
participant AuthZenService
participant PDP as Policy Decision Point
Client->>AuthZenService: POST /stores/{store_id}/access/v1/evaluation\nEvaluationRequest (subject, resource, action, context)
AuthZenService->>AuthZenService: Validate request, apply options/semantic
AuthZenService->>PDP: Evaluate request / batch items
PDP-->>AuthZenService: Decision(s) + context/metadata
AuthZenService-->>Client: EvaluationResponse / EvaluationsResponse (decisions, context, errors)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…moved AuthZen tag for consistency in swaggere generation
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 8 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… fixed field numbers in Action
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 8 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@authzen/v1/authzen_service.proto`:
- Around line 495-498: The evaluations repeated field currently only has
(validate.rules).repeated.min_items = 1 on the field `evaluations` (type
`EvaluationsItemRequest`) which allows unbounded batches; add a
`(validate.rules).repeated.max_items = 100` (or another agreed upper bound) to
the same options block so the proto and generated OpenAPI include a maxItems
ceiling and prevent excessively large requests.
- Around line 1-697: The authzen_service.proto file (service AuthZenService and
its messages) is not formatted and its generated OpenAPI/docs are out of sync;
run the repository's proto format and generation flow (e.g., run buf format -w
on authzen_service.proto and then run the project's proto generation step such
as buf generate or the repo's make/script that produces the OpenAPI/Swagger
artifacts), regenerate the derived docs/OpenAPI, review the diffs, and commit
the updated proto and generated artifacts so CI passes.
- Around line 392-397: EvaluationsItemRequest currently allows empty items;
update the proto to enforce that each EvaluationsItemRequest contains at least
one of subject, resource, or action (e.g., by adding a validation rule or
converting to a oneof/required-group for subject | resource | action) so that an
item like {} is rejected, and apply the same validation intent to
EvaluationsRequest items (even though evaluations has min_items = 1) to prevent
empty entries; also add contract tests that send { "evaluations": [{}] } and
assert validation failure. Ensure you modify the EvaluationsItemRequest message
(fields: subject, resource, action, context) and add/enable the appropriate
validation annotations your build uses (e.g., PGV or buf.validate) and
corresponding test cases.
In `@docs/openapiv2/apidocs.swagger.json`:
- Around line 35-103: The checked-in apidocs.swagger.json was hand-edited;
revert manual changes and instead update the proto/source annotations that
generate the "/.well-known/authzen-configuration/{store_id}" endpoint (look for
the RPC/annotation that yields operationId "GetConfiguration" and its OpenAPI
options), then run the generator via the Makefile target or
scripts/update_swagger.sh to regenerate apidocs.swagger.json; ensure the same
fix is applied for the other mentioned hunks (lines ~385-877 and ~2249-3502) by
editing the proto annotations and re-running the generator rather than editing
JSON directly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f8507159-2a89-44cb-885a-b7a471065de1
⛔ Files ignored due to path filters (2)
proto/authzen/v1/authzen_service.pb.gois excluded by!**/*.pb.goproto/authzen/v1/authzen_service_grpc.pb.gois excluded by!**/*.pb.go
📒 Files selected for processing (4)
authzen/v1/authzen_service.protobuf.yamldocs/openapiv2/apidocs.swagger.jsonproto/authzen/v1/authzen_service.pb.validate.go
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 8 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 8 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
What problem is being solved?
How is it being solved?
What changes are made to solve it?
References
Review Checklist
mainSummary by CodeRabbit
New Features
Documentation