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

[full-ci] set demo users to default off #3474

Merged
merged 4 commits into from
Apr 11, 2022
Merged

[full-ci] set demo users to default off #3474

merged 4 commits into from
Apr 11, 2022

Conversation

micbar
Copy link
Contributor

@micbar micbar commented Apr 6, 2022

Description

Disable the creation of the demo users by default

Tasks

  • Default value should be false
  • adjust CI
  • adjust Demo Deployments
  • adjust DevDocs

Related Issue

Motivation and Context

  • Strengthen the security

How Has This Been Tested?

  • CI
  • Manually

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change, it changes the default behavior
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@update-docs

This comment was marked as resolved.

@ownclouders
Copy link
Contributor

ownclouders commented Apr 7, 2022

💥 Acceptance test localApiTests-apiArchiver-ocis failed. Further test are cancelled...

@micbar micbar force-pushed the no-demo-users branch 2 times, most recently from 6ba339b to c488afb Compare April 8, 2022 19:47
@micbar micbar changed the title set demo users to default off [full-ci] set demo users to default off Apr 9, 2022
@micbar micbar requested a review from mmattel April 9, 2022 14:38
@micbar micbar self-assigned this Apr 9, 2022
@micbar micbar added Category:Change Change existing functionality Status:Needs-Review Needs review from a maintainer Topic:Security labels Apr 9, 2022
@micbar micbar marked this pull request as ready for review April 9, 2022 14:38
@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 9, 2022

Kudos, SonarCloud Quality Gate passed!    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
0.0% 0.0% Duplication

@mmattel
Copy link
Contributor

mmattel commented Apr 10, 2022

This is confusing and needs clearance before merging:

  • An env is presen ACCOUNTS_DEMO_USERS_AND_GROUPS but it states in the remark its immediate depreciation when switching to something different internally?
  • In parallel a second env is present IDM_CREATE_DEMO_USERS - reason, use?
  • Then we have a third env named DEMO_USERS...
  • When you have decided to have the demo users created, what is the process to disable them?
    Is it just to not use the env? or do you need additional steps? Asking because there is a difference in the term creation (persistance, needs deletion in case) and use (enable/disable).
  • To create an ordinary admin, you have to create the demo users, create the new admin account and then delete/disable the demo users again? (+ can you do this on the command line or is web necessary?)

@EParzefall fyi

@micbar
Copy link
Contributor Author

micbar commented Apr 10, 2022

This is confusing and needs clearance before merging:

  • An env is presen ACCOUNTS_DEMO_USERS_AND_GROUPS but it states in the remark its immediate depreciation when switching to something different internally?

We are in a two-step transition. The accounts service will be deleted in the next 2 weeks, but before we need this move

  • In parallel a second env is present IDM_CREATE_DEMO_USERS - reason, use?

That will be the value after we remove the accounts service

  • Then we have a third env named DEMO_USERS...

This is not in the code, it is just in the demo deployments, another abstraction layer like INSECURE

  • When you have decided to have the demo users created, what is the process to disable them?

Remove them manually

Is it just to not use the env? or do you need additional steps? Asking because there is a difference in the term creation (persistance, needs deletion in case) and use (enable/disable).

creation, it means the accounts are persisted

  • To create an ordinary admin, you have to create the demo users, create the new admin account and then delete/disable the demo users again? (+ can you do this on the command line or is web necessary?)

Like stated in the docs, we always create the admin and the idp user (internal). Changing their credentials is currently only possible via the CLI. In the future, after the switch to IDM, the initial passwords can be set by a config variable.

@EParzefall fyi

@mmattel @EParzefall I admit, the whole ocis config is still very confusing. It will change another time before beta.

We need to merge this change here to make it more secure.

The switch to LibreIDM will happen in the next sprint. And it will create a bunch of new documentation and config options.
#3259

@micbar
Copy link
Contributor Author

micbar commented Apr 10, 2022

@mmattel @EParzefall I am not sure if the whole demo users topic should be in the admin docs. For the admins, it is important that they know how to deploy a secure ocis in production. BTW this is the reason why we change the default behavior. You only get the demo users when you explicitly want them. This prevents insecure oCIS instances out there where demo users are present and the admin is not aware of them.

@mmattel
Copy link
Contributor

mmattel commented Apr 10, 2022

The documentation of the demo users is definitely necessary for the admin docs, means creation, removal, warning ect. This has to be in because one will find the env and gives it a try. As it is in the docs, he then knows the impact and how to remove properly.

I will use the new env and not the old one as you said it will get removed soon. Not worth doing double work - but I will hook myself into the referenced issue to get notified when it is merged.

@mmattel
Copy link
Contributor

mmattel commented Apr 10, 2022

Like stated in the docs, we always create the admin and the idp user (internal)

Q: as far I have understood and read in dev.docs, the "admin" user created is part of the demo users. I understand the IDP user which is not part of the demo users but where is that written. Did I missed something?

If I got it right, to create a new admin user, you use ocis accounts create and grant rights -or?

@micbar
Copy link
Contributor Author

micbar commented Apr 10, 2022

@mmattel Please let us not bother with the old accounts CLI.

We merge this and use this the next 2 weeks. Then switch to LibreIDM

@mmattel
Copy link
Contributor

mmattel commented Apr 10, 2022

I do not know what is old and what is new and what the differences and impacts are...

@micbar
Copy link
Contributor Author

micbar commented Apr 10, 2022

everything with the noun accounts is going to removed from oCIS.

We never wanted to do user management in ocis. Creating the accounts service was a mistake in the past.

In the future we will only rely on an external Identity Management.

For the out of the box use case, like "Download and start" we will ship a replacable Identity Management System called LibreIDM which is part of the owncloud & Kopano collaboration.

So what does that mean for you and the docs:

IMO the admin docs should focus on how to connect an external IDP.

We do not know yet, how much the LibreIDM scales. We suppose it will only be supported for very small use cases.

So the mesage would be:

  1. LibreIDM for testing"or small deployments. Remember, oCIS should run on a raspberry PI
  2. Real LDAP (like openLDAP or microsoft AD) server and IDP (like keycloak, ping, azure) if you are serious about your ocis instance.

This PR is mainly about changing the CI and the Demo Deployments. It should be merged ASAP.

@micbar
Copy link
Contributor Author

micbar commented Apr 10, 2022

everything with the noun accounts is going to removed from oCIS.

We never wanted to do user management in ocis. Creating the accounts service was a mistake in the past.

In the future we will only rely on an external Identity Management.

For the out of the box use case, like "Download and start" we will ship a replacable Identity Management System called LibreIDM which is part of the owncloud & Kopano collaboration.

So what does that mean for you and the docs:

IMO the admin docs should focus on how to connect an external IDP.

We do not know yet, how much the LibreIDM scales. We suppose it will only be supported for very small use cases.

So the mesage would be:

  1. LibreIDM for testing or small deployments. Remember, oCIS should run on a raspberry PI
  2. Real LDAP (like openLDAP or microsoft AD) server and IDP (like keycloak, ping, azure) if you are serious about your ocis instance.

This PR is mainly about changing the CI and the Demo Deployments. It should be merged ASAP.

@micbar micbar merged commit b02125d into master Apr 11, 2022
@delete-merged-branch delete-merged-branch bot deleted the no-demo-users branch April 11, 2022 09:13
ownclouders pushed a commit that referenced this pull request Apr 11, 2022
Merge: a3d219d 89a5d34
Author: Michael Barz <mbarz@owncloud.com>
Date:   Mon Apr 11 11:13:13 2022 +0200

    Merge pull request #3474 from owncloud/no-demo-users

    [full-ci] set demo users to default off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Change Change existing functionality Status:Needs-Review Needs review from a maintainer Topic:Security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable the creation of the demo users by default
4 participants