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

[#1592] provide "Bearer" authentication for devops resources controlled via UI #1594

Merged
merged 2 commits into from
Mar 8, 2023

Conversation

thjaeckle
Copy link
Member

  • added radiobutton groups so that "Authorize" modal clearly shows/states which authentication to use where
  • reduced to a single "Authorize" button in modal
  • simplified environment a bit

Resolves: #1592

Screenshot of modal:
Screen Shot 2023-03-06 at 20 12 36 PM

…ed via UI

* added radiobutton groups so that "Authorize" modal clearly shows/states which authentication to use where
* reduced to a single "Authorize" button in modal
* simplified environment a bit

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@beyonnex.io>
@thjaeckle thjaeckle added this to the 3.2.0 milestone Mar 6, 2023
@thjaeckle thjaeckle marked this pull request as ready for review March 6, 2023 19:14
@thjaeckle
Copy link
Member Author

thjaeckle commented Mar 6, 2023

@thfries could you please take a look and check if this is also in your opinion good? :)

Right after creating the PR I thought that the "Authorize" modal should mabye group by main / devops credentials and not by the authentication type.
So:

  1. Main user
    a) basic auth
    b) bearer auth
    c) pre-authenticated auth
  2. Devops user
    a) basic auth
    b) bearer auth

What do you think?

*edit:
This way it would look (IMO much better):
Screen Shot 2023-03-07 at 07 52 49 AM

… devops" auth

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@beyonnex.io>
@thjaeckle
Copy link
Member Author

I would plan the Ditto release 3.2.0 for tomorrow.
An approval of this PR would be nice to make it into the release.
/cc @thfries @alstanchev @jufickel-b

@thfries
Copy link
Contributor

thfries commented Mar 7, 2023

The second approach is better. In the first case, the radio buttons do not fit, because you can work with both users in parallel (it is not either / or, you can enter both).

The separation of DevOps API and "Main" API is a bit confusing. There are two variants to retrieve the connections. The DevOps user is currently only needed for the "old" Ditto 2 way to retrieve connections.
So I think the separate authorize method for the DevOps user makes more sense for the new feature in #1590

Do you think we should remove the Ditto 2 support for connections?

@thjaeckle
Copy link
Member Author

The separation of DevOps API and "Main" API is a bit confusing. There are two variants to retrieve the connections. The DevOps user is currently only needed for the "old" Ditto 2 way to retrieve connections.

Hm, actually no. There are 2 variants to retrieve connections, yes.
However both require the "DevOps authentication" (either via basic auth or OAuth, depending on how Ditto is configured).
The "main user" can never access connections in Ditto.

I think the proposed PR does correctly reflect the current possibilities.

Also no need to drop Ditto 2 support.

@thfries
Copy link
Contributor

thfries commented Mar 7, 2023

Hi @thjaeckle,
I tested and reviewed and it looks good to me.
(in case of Things service, you need to enter the same bearer twice now? but it works)

Thanks!

@thjaeckle
Copy link
Member Author

Thanks @thfries .

Ah, yes. For Bosch IoT things the end user can have access to the connections.
The Bearer tokens could still differ of course.
The solution Admin does not have automatically access to things for example.

@thjaeckle thjaeckle merged commit 49669e6 into master Mar 8, 2023
@thjaeckle thjaeckle deleted the feature/ui-devops-bearer-auth branch March 8, 2023 07:18
@thjaeckle thjaeckle added the UI Issues related to the Ditto explorer UI label Mar 8, 2023
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI Issues related to the Ditto explorer UI
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

UI: Provide Bearer authentication for devops user
2 participants