From f2e73c510265fbbf6713db6d00561887bf23c8b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 17 Mar 2020 16:20:37 +0100 Subject: [PATCH] use physicist demo users MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- changelog/unreleased/physics-users.md | 5 +++ pkg/command/server.go | 54 ++++++++++++++++++++++++--- pkg/flagset/flagset.go | 2 +- 3 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 changelog/unreleased/physics-users.md diff --git a/changelog/unreleased/physics-users.md b/changelog/unreleased/physics-users.md new file mode 100644 index 0000000..606fe81 --- /dev/null +++ b/changelog/unreleased/physics-users.md @@ -0,0 +1,5 @@ +Change: use physicist demo users + +Demo users like admin, demo and test don't allow you to tell a story. Which is why we changed the set of hard coded demo users to einstein, marie and feynman. You should know who they are. This also changes the ldap domain from `dc=owncloud,dc=com` to `dc=example,dc=org` because that is what these users use as their email domain. + +https://github.com/owncloud/ocis-glauth/issues/5 \ No newline at end of file diff --git a/pkg/command/server.go b/pkg/command/server.go index 71d6b5e..da97cfe 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -160,25 +160,69 @@ func Server(cfg *config.Config) *cli.Command { // TODO read users for the config backend from config file Users: []glauthcfg.User{ glauthcfg.User{ - Name: "admin", + Name: "einstein", + GivenName: "Albert", + SN: "Einstein", UnixID: 20000, PrimaryGroup: 30000, - Mail: "admin@example.com", - PassSHA256: "8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918", // admin + OtherGroups: []int{30001, 30002, 30007}, + Mail: "einstein@example.org", + PassSHA256: "69bf3575281a970f46e37ecd28b79cfbee6a46e55c10dc91dd36a43410387ab8", // relativity }, glauthcfg.User{ - Name: "demo", + Name: "marie", + GivenName: "Marie", + SN: "Curie", UnixID: 20001, PrimaryGroup: 30000, - Mail: "demo@example.com", + OtherGroups: []int{30003, 30004, 30007}, + Mail: "marie@example.org", PassSHA256: "2a97516c354b68848cdbd8f54a226a0a55b21ed138e207ad6c5cbb9c00aa5aea", // demo }, + glauthcfg.User{ + Name: "feynman", + GivenName: "Richard", + SN: "Feynman", + UnixID: 20002, + PrimaryGroup: 30000, + OtherGroups: []int{30005, 30006, 30007}, + Mail: "feynman@example.org", + PassSHA256: "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", // test + }, }, Groups: []glauthcfg.Group{ glauthcfg.Group{ Name: "users", UnixID: 30000, }, + glauthcfg.Group{ + Name: "sailing-lovers", + UnixID: 30001, + }, + glauthcfg.Group{ + Name: "violin-haters", + UnixID: 30002, + }, + glauthcfg.Group{ + Name: "radium-lovers", + UnixID: 30003, + }, + glauthcfg.Group{ + Name: "polonium-lovers", + UnixID: 30004, + }, + glauthcfg.Group{ + Name: "quantum-lovers", + UnixID: 30005, + }, + glauthcfg.Group{ + Name: "philosophy-haters", + UnixID: 30006, + }, + glauthcfg.Group{ + Name: "physics-lovers", + UnixID: 30007, + }, }, } server, err := glauth.NewServer( diff --git a/pkg/flagset/flagset.go b/pkg/flagset/flagset.go index fbd4261..6104698 100644 --- a/pkg/flagset/flagset.go +++ b/pkg/flagset/flagset.go @@ -169,7 +169,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "backend-basedn", - Value: "dc=owncloud,dc=com", + Value: "dc=example,dc=org", Usage: "base distinguished name to expose", EnvVars: []string{"GLAUTH_BACKEND_BASEDN"}, Destination: &cfg.Backend.BaseDN,