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

Replace readable names by uuids in the readme, tests and examples #276

Open
rhamzeh opened this issue Jan 15, 2024 · 5 comments
Open

Replace readable names by uuids in the readme, tests and examples #276

rhamzeh opened this issue Jan 15, 2024 · 5 comments
Labels
dotnet-sdk Affects the C#/DotNet SDK go-sdk Affects the Go SDK good first issue Good for newcomers hacktoberfest java-sdk Affects the Java/Kotlin SDK js-sdk Affects the JavaScript SDK python-sdk Affects the Python SDK

Comments

@rhamzeh
Copy link
Member

rhamzeh commented Jan 15, 2024

For example here in the .NET SDK

var body = new ClientCheckRequest {
    User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
    Relation = "writer",
    Object = "document:roadmap"
};

can be written as:

var body = new ClientCheckRequest {
    User = "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
    Relation = "writer",
    Object = "document:9f81b5ba-cd00-450e-8127-3786c92aeab9"
};
@rhamzeh rhamzeh added good first issue Good for newcomers go-sdk Affects the Go SDK dotnet-sdk Affects the C#/DotNet SDK js-sdk Affects the JavaScript SDK python-sdk Affects the Python SDK java-sdk Affects the Java/Kotlin SDK labels Jan 15, 2024
@srose
Copy link
Contributor

srose commented Feb 24, 2024

I am wondering why uuids are favored over readable names especially in readmes, tests and examples. Any small hint is appreciated...

@rhamzeh
Copy link
Member Author

rhamzeh commented Sep 19, 2024

@srose - way too late of a reply, but basically the fact that we use human readable IDs in our docs have been interpreted by many users that that's what they should do despite our many warnings across the documentation.

We want to stress that OpenFGA does not need any identifiable data other than the unique identifier of that element in your DB.

I agree that it is much easier to follow when we have human readable ids in our documentation, but people are mistaking this to be our recommended way.

Will chat a bit more with the team if we can pepper more warnings across the READMEs and documentation in lieu of this

@sccalabr
Copy link
Contributor

Id like to give this a try if its still open

@ewanharris
Copy link
Member

@sccalabr, this issue is still free. As the issue description states, we're looking to replace any usage of a readable name in the id portion of user or object field with a uuid (so "document:roadmap" becomes "document:9f81b5ba-cd00-450e-8127-3786c92aeab9". It would be awesome if this is done across all our SDKs. I'd recommend doing it in this repo, in the template directory of each SDK, you'll most like just need to look at the README_ files.

Please let me know if you need any guidance

@srose
Copy link
Contributor

srose commented Oct 18, 2024

@rhamzeh thank you for your reply. sorry to have it missed because of message overflow in my github-inbox. Totally agree after your explanation.

@sccalabr let me know if I can somehow be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-sdk Affects the C#/DotNet SDK go-sdk Affects the Go SDK good first issue Good for newcomers hacktoberfest java-sdk Affects the Java/Kotlin SDK js-sdk Affects the JavaScript SDK python-sdk Affects the Python SDK
Projects
Status: Backlog
Development

No branches or pull requests

5 participants