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

Introduce ADR #1042

Merged
merged 7 commits into from
Feb 10, 2021
Merged

Introduce ADR #1042

merged 7 commits into from
Feb 10, 2021

Conversation

butonic
Copy link
Member

@butonic butonic commented Dec 9, 2020

We will keep track of Architectual Decision Records using Markdown in /docs/adr.

This PR adds three ADRs which @micbar, @dragotin, @hodyroff, @pmaier1, @IljaN and I were discussing today.

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
docs/adr/0002-persist-accounts-using-cs3-storage.md Outdated Show resolved Hide resolved
docs/adr/0002-persist-accounts-using-cs3-storage.md Outdated Show resolved Hide resolved
docs/adr/0003-outsource-user-management.md Outdated Show resolved Hide resolved
docs/adr/0003-outsource-user-management.md Outdated Show resolved Hide resolved
docs/adr/0003-outsource-user-management.md Outdated Show resolved Hide resolved
docs/adr/0003-outsource-user-management.md Outdated Show resolved Hide resolved
docs/adr/0003-outsource-user-management.md Outdated Show resolved Hide resolved
Co-authored-by: Alex Unger <6905948+refs@users.noreply.github.com>
docs/adr/0001-introduce-accounts-service.md Outdated Show resolved Hide resolved
docs/adr/0001-introduce-accounts-service.md Outdated Show resolved Hide resolved
docs/adr/0001-introduce-accounts-service.md Outdated Show resolved Hide resolved
docs/adr/0002-persist-accounts-using-cs3-storage.md Outdated Show resolved Hide resolved
docs/adr/0003-outsource-user-management.md Outdated Show resolved Hide resolved
docs/adr/0003-outsource-user-management.md Outdated Show resolved Hide resolved
docs/adr/0003-outsource-user-management.md Outdated Show resolved Hide resolved
docs/adr/0003-outsource-user-management.md Outdated Show resolved Hide resolved
docs/adr/0003-outsource-user-management.md Outdated Show resolved Hide resolved
docs/adr/0003-outsource-user-management.md Outdated Show resolved Hide resolved
butonic and others added 2 commits December 9, 2020 15:54
so embarrassing. Thx @phil-davis

Co-authored-by: Phil Davis <phil@jankaritech.com>
docs/adr/0001-introduce-accounts-service.md Outdated Show resolved Hide resolved
docs/adr/0001-introduce-accounts-service.md Outdated Show resolved Hide resolved
docs/adr/0001-introduce-accounts-service.md Outdated Show resolved Hide resolved
docs/adr/0001-introduce-accounts-service.md Outdated Show resolved Hide resolved
docs/adr/0003-outsource-user-management.md Outdated Show resolved Hide resolved
- Single binary: admin can manage users, groups and roles using the built in web ui (glauth)
- External LDAP: OCIS admin needs to use existing tool to manage users
- Separate OCIS and LDAP admin: OCIS admin relies on the LDAP admin to manage users

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the two LDAP servers scenario, where we use the customers LDAP for internal users and another one (GLAuth?) for guest accounts? Might even make sense to have the web ui for disabling guest users...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GLauth already has a primary and fallback backend. The chain can easily be extended to multiple backends. login and single user properties can even be made in parallel. The only challenge is merging results when searching recipients in multiple ldap servers, but since 1000 results are not helpful for users we can limit the page size to 10 per ldap. Furthermore, multiple ldap servers indicate larger deployments where user lookup via ldap is restricted to exact matches, eg. the full email. In these cases merging becomes trivial again.

We may want to cache these queries anyway in order not flood ldap servers with lookup requests.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We decided to make multiple LDAP servers possible through an additional service which works as a connector to multiple LDAP servers and exposes their user information via the GraphAPI

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would summarize the two comments to "GLAuth abstracts multiple LDAP servers that might exist into one that looks like one to the consumer. A GraphAPI will be provided to interact with GLAuth to manage guest users (for that, at least one of the LDAPs must be read/write)".

Thoughts:

  • The GLAuth must somehow expose if it allows write ops to create or edit (Guest-) Users or not.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reworked the list

- Separate OCIS and LDAP admin: OCIS admin relies on the LDAP admin to manage users

### Resulting technical implications
- add graphapi to glauth so the ocis web ui can use it to manage users
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the web ui should move to GLAuth? Embedding it in oC Web could be done by wrapping it into an oC Web extension (need to check if that's possible. I don't want an iframe solution).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may not be able to theme the glauth web ui as we like it. Also the tight integration we have in the current implementation is awesome / slick. We need to embed glauth anyway. The first step would be to treat the current accounts service as the drop in ldap server with a web ui to manage users. It would mean merging ocis-accounts and ocis-glauth.
The next step would be to add the graph api to glauth. then we can build a web ui that uses glauth to manage accounts.

This accounts-management service would be a web ui to manage accounts via the graph api. It could be part of glauth or we use an embedded, tightly integrated version for ocis-web that follows our theme.

The final step would be a graphapi implementation that is backed by a real ldap server. I'd put that into glauth because it already has several backends. Having a graphapi <-> ldap proxy would fit GLauth I think.

But in order to have a truly embeddable web ui I think glauth shoul start with the graph api. It can then have a web ui or projects that want to embed it can build the ui in the way they want. The kopano guys @fbartels @longsleep might want to use react to embed it into konnectd.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added as a bullet point, because I agree: keep the ui in GLAuth


### Resulting technical implications
- add graphapi to glauth so the ocis web ui can use it to manage users
- make graphapi service to directly talk to an LDAP server so our web ui can use it
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get this one 😅 we don't want to bypass LDAP admins. Thought that the web ui for user management is only supposed to be used in case we have GLAuth as LDAP replacement.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Basic idea is the following: We don't need write access via the LDAP protocol when a IDM would have a second interaction point via the GraphAPI.

We can imagine quite a lot of scenarios, where e.g. the provisoining of guest users in the IDM would happen via a public http api endpoint.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah but we learned that for small scale deployments some admins actually prefer a simple ui ... 🤷
If the web ui is self contained, having it in glauth should be fine. I don't want to build the next keycloak ...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that even the super-duper LDAP is covered by a thin layer of GLAuth?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would a customer give us write access via GraphAPI when they don't want to give us write access via LDAP? 🤔 I thought about the web ui as an option to provide easy to use read/write access for the GLAuth tiny setup use case. As in the 5 people company that doesn't have an actual LDAP, the family who want to handle their photos and the like. Why would we want to build an accounts web ui for Siemens? They have their own tools for user management.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GLAuth cannot write to an ldap server, it can only write to other backends.

Reworded the list

docs/adr/0003-outsource-user-management.md Outdated Show resolved Hide resolved
docs/adr/0003-outsource-user-management.md Outdated Show resolved Hide resolved
Co-authored-by: Benedikt Kulmann <benedikt@kulmann.biz>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Contributor

@micbar micbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kulmann @butonic I tried to clarify the Graph API ideas.

It would help to have a diagram. How do diagrams fit into that ADR format?

@butonic
Copy link
Member Author

butonic commented Dec 10, 2020

it is madr ... so markdown ... we should be able to embed .drawio.svg files ...

@butonic
Copy link
Member Author

butonic commented Dec 10, 2020

@micbar maybe we can manage the docs generation with our normal docs pipeline?

@micbar
Copy link
Contributor

micbar commented Dec 10, 2020

@butonic yes. First merge it. Then hook it up to hugo.

@butonic butonic requested review from fschade and wkloucek December 10, 2020 08:28
Copy link
Contributor

@dragotin dragotin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be awesome to have a little diagram attached...

docs/adr/0003-outsource-user-management.md Outdated Show resolved Hide resolved
docs/adr/0003-outsource-user-management.md Outdated Show resolved Hide resolved
- Single binary: admin can manage users, groups and roles using the built in web ui (glauth)
- External LDAP: OCIS admin needs to use existing tool to manage users
- Separate OCIS and LDAP admin: OCIS admin relies on the LDAP admin to manage users

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would summarize the two comments to "GLAuth abstracts multiple LDAP servers that might exist into one that looks like one to the consumer. A GraphAPI will be provided to interact with GLAuth to manage guest users (for that, at least one of the LDAPs must be read/write)".

Thoughts:

  • The GLAuth must somehow expose if it allows write ops to create or edit (Guest-) Users or not.


### Resulting technical implications
- add graphapi to glauth so the ocis web ui can use it to manage users
- make graphapi service to directly talk to an LDAP server so our web ui can use it
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that even the super-duper LDAP is covered by a thin layer of GLAuth?

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@butonic
Copy link
Member Author

butonic commented Feb 9, 2021

@micbar @dragotin @pmaier1 @kulmann I finally incorporated your feedback. No diagrams though. Show me your thumbs!

Copy link
Contributor

@kulmann kulmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
(comments are just about some typos etc)

docs/adr/0001-introduce-accounts-service.md Outdated Show resolved Hide resolved
docs/adr/0003-external-user-management.md Outdated Show resolved Hide resolved
docs/adr/0003-external-user-management.md Outdated Show resolved Hide resolved
docs/adr/0003-external-user-management.md Outdated Show resolved Hide resolved
Copy link
Contributor

@pmaier1 pmaier1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<3

Co-authored-by: Benedikt Kulmann <benedikt@kulmann.biz>
Copy link
Member

@refs refs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@butonic butonic requested a review from dragotin February 10, 2021 12:18
Copy link
Contributor

@fschade fschade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dragotin dragotin merged commit 6ef5794 into master Feb 10, 2021
@delete-merged-branch delete-merged-branch bot deleted the introduce-adr branch February 10, 2021 17:05
ownclouders pushed a commit that referenced this pull request Feb 10, 2021
Merge: 182f895 1ddfb7c
Author: Klaas Freitag <kfreitag@owncloud.com>
Date:   Wed Feb 10 18:05:51 2021 +0100

    Merge pull request #1042 from owncloud/introduce-adr

    Introduce ADR
@micbar micbar mentioned this pull request Feb 17, 2021
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.