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

Documentation for building OAuth clients #1784

Closed
htdvisser opened this issue Dec 24, 2019 · 10 comments
Closed

Documentation for building OAuth clients #1784

htdvisser opened this issue Dec 24, 2019 · 10 comments
Assignees
Labels
documentation This involves writing user documentation

Comments

@htdvisser
Copy link
Contributor

Summary

It would be good to write some documentation for registering (and working with) OAuth clients.

Why do we need this ?

To help users integrate The Things Stack with their applications.

What is already there? What do you see now?

ttn-lw-cli commands to manage OAuth clients

What is missing? What do you want to see?

Documentation for how to register, what scopes to ask for, maybe an example OAuth flow.

Can you do this yourself and submit a Pull Request?

Yes

@htdvisser htdvisser added the documentation This involves writing user documentation label Dec 24, 2019
@htdvisser htdvisser added this to the Next Up milestone Dec 24, 2019
@htdvisser htdvisser self-assigned this Dec 24, 2019
@GMouaad
Copy link

GMouaad commented Jan 1, 2020

This would be very helpful! Thank you in advance :)

@LasaleFamine
Copy link

I was just searching something like this, I didn't know even that some CLI command exist yet for OAuth clients registration. I will try with the CLI but would be really helpful to know what's the best approach 👍

@htdvisser htdvisser modified the milestones: Next Up, July 2020 Jul 1, 2020
@htdvisser htdvisser modified the milestones: July 2020, August 2020 Aug 3, 2020
@htdvisser htdvisser modified the milestones: August 2020, September 2020 Aug 31, 2020
@johanstokking johanstokking modified the milestones: October 2020, Next Up Oct 13, 2020
@htdvisser htdvisser modified the milestones: Next Up, 2021 Q2 Mar 31, 2021
@htdvisser htdvisser modified the milestones: 2021 Q2, 2021 Q3 Jun 23, 2021
@htdvisser htdvisser added the blocked This can't continue until another issue or pull request is done label Jun 23, 2021
@htdvisser

This comment was marked as outdated.

@htdvisser htdvisser modified the milestones: 2021 Q3, 2022 Conference Sep 23, 2021
@htdvisser

This comment was marked as outdated.

@NicolasMrad NicolasMrad modified the milestones: 2021 Q4, 2022 Q1 Dec 10, 2021
@htdvisser htdvisser modified the milestones: 2022 Q1, 2022 Q2 Mar 28, 2022
@htdvisser

This comment was marked as outdated.

@ryaplots ryaplots removed the blocked This can't continue until another issue or pull request is done label Jun 15, 2022
@NicolasMrad NicolasMrad modified the milestones: 2022 Q2, 2022 Q3 Jun 27, 2022
@htdvisser
Copy link
Contributor Author

Since this is now implemented in the Console, here are some starting points for the documentation:

  1. OAuth clients can be managed by going to /oauth/oauth-clients on the IS cluster (TTS CE: https://eu1.cloud.thethings.network/oauth/oauth-clients)

  2. When you register an OAuth client, you should keep in mind that it will have to be approved by an admin. The scope and duration of the review process depends on the network where you register your OAuth client. If you register it in your own tenant on The Things Stack Cloud, then the administrator (probably you) can approve it right away. If you register an OAuth client on The Things Stack Community Edition, the administrators will take some more time to review if and how the OAuth client benefits the community. Now that the first requests are coming in, we have started working on defining the review guidelines. Some things that the admins look at are:

    • The ID and name of the user / organization that owns the OAuth client should clearly identify who is providing the service. For public clients, this should typically be an organization with the brand name as ID. For private/testing clients this can also be a user ID. For personal testing clients, approval should not be needed (we need to work on that; see issue 49). IDs or names that could be confused with official TTN IDs/names will be rejected.
    • The ID of the OAuth client should ideally consist of the brand name of the application, and the purpose of the OAuth client (example: "mycompany-gateway-onboarding"). Keep in mind that you can't change the Client ID after registration, and you can't re-use the Client ID after deletion.
    • The name and description should be clear. The name is typically the capitalized form of the ID. The description should explain to users what the application does (example name: "MyBrand Gateway Manager" and description: "Manage your MyBrand gateway from the mobile app")
    • The redirect URI(s) should work.
    • The logout redirect URI(s) are optional.
    • The password grant should never be used. No exceptions.
    • The refresh_token grant should only be used when non-interactive access is clearly required.
    • The rights should be appropriate given the name and description of the OAuth client.

Once the OAuth client registration is approved (or once issue 49 is implemented) you can start using the OAuth client with the following settings:

When working with multi-tenant deployments, things get a bit more complicated, but I think this is a good start.

@htdvisser htdvisser removed this from the 2022 Q3 milestone Aug 3, 2022
@htdvisser htdvisser removed their assignment Aug 3, 2022
@htdvisser htdvisser added the needs/triage We still need to triage this label Aug 3, 2022
@htdvisser
Copy link
Contributor Author

Bumping back to triage for re-assignment and planning.

cc: @NicolasMrad

@NicolasMrad NicolasMrad removed the needs/triage We still need to triage this label Aug 9, 2022
@NicolasMrad NicolasMrad added this to the 2022 Q3 milestone Aug 9, 2022
@NicolasMrad
Copy link
Contributor

@nejraselimovic can you handle this?

@NicolasMrad NicolasMrad modified the milestones: 2022 Q3, 2022 Q4 Oct 10, 2022
@nejraselimovic
Copy link
Contributor

@nejraselimovic can you handle this?

Not sure if I understand these concepts completely, but if it's not urgent you can assign it to me and I'll do a bit research and look into it.

@KrishnaIyer
Copy link
Member

This is moved to the docs repo; #1784

@KrishnaIyer KrishnaIyer closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This involves writing user documentation
Projects
None yet
Development

No branches or pull requests

8 participants