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

.NET Quickstart broken #2064

Closed
1 task done
jimpudar opened this issue Mar 21, 2024 · 0 comments · Fixed by #2065
Closed
1 task done

.NET Quickstart broken #2064

jimpudar opened this issue Mar 21, 2024 · 0 comments · Fixed by #2065
Labels
kind/bug Something isn't working status/triage

Comments

@jimpudar
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Following the Quickstart documentation using the .NET SDK at docs/modules/ROOT/pages/quickstart.adoc fails after adding the rule to the policy to allow users to view public albums.

The .NET SDK example file is here: docs/modules/ROOT/examples/quickstart/example.cs

Removing the line .WithPolicyVersion("20210210") makes it work again.

It's possible I'm missing something, but it appears to me that the other SDK examples don't specify any policy version. I think it was just a mistake that was accidentally added in this commit: c7c5f37

If this makes sense, I can raise a PR to remove this line.

Expected Behavior

Following the Quickstart documentation with the .NET SDK should work properly.

Steps To Reproduce

Follow the Quickstart documentation using the .NET SDK.

Observe it works properly until the final step If you try the request again, bugs_bunny now has view:public access to the album owned by daffy_duck but not comment access.

Remove the line .WithPolicyVersion("20210210"), and then the final step works as expected.

Environment

- OS: Arch Linux
- Cerbos version: ghcr.io/cerbos/cerbos:0.34.0
- Docker version: 25.0.4
- Go version: N/A

Anything else?

No response

@jimpudar jimpudar added kind/bug Something isn't working status/triage labels Mar 21, 2024
jimpudar added a commit to jimpudar/cerbos that referenced this issue Mar 21, 2024
Specifying a policy version for the resource "DAFFY002" in the
.NET SDK version of the quickstart docs causes the final step
to not work as described.

Removing this policy version specification fixes the issue, and
the quickstart works as intended.

Fixes cerbos#2064

Signed-off-by: Jim Pudar <jim@pudar.com>
charithe pushed a commit that referenced this issue Mar 22, 2024
Specifying a policy version for the resource "DAFFY002" in the .NET SDK
version of the quickstart docs causes the final step to not work as
described.

Removing this policy version specification fixes the issue, and the
quickstart works as intended.

Fixes #2064

- [X] The PR title has the correct prefix 
- [X] PR is linked to the corresponding issue
- [X] All commits are signed-off (`git commit -s ...`) to provide the
[DCO](https://developercertificate.org/)

Signed-off-by: Jim Pudar <jim@pudar.com>
charithe pushed a commit to charithe/cerbos that referenced this issue Mar 22, 2024
Specifying a policy version for the resource "DAFFY002" in the .NET SDK
version of the quickstart docs causes the final step to not work as
described.

Removing this policy version specification fixes the issue, and the
quickstart works as intended.

Fixes cerbos#2064

- [X] The PR title has the correct prefix 
- [X] PR is linked to the corresponding issue
- [X] All commits are signed-off (`git commit -s ...`) to provide the
[DCO](https://developercertificate.org/)

Signed-off-by: Jim Pudar <jim@pudar.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working status/triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant