Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

actually start glauth server #1

Merged
merged 9 commits into from
Feb 28, 2020
Merged

actually start glauth server #1

merged 9 commits into from
Feb 28, 2020

Conversation

butonic
Copy link
Member

@butonic butonic commented Feb 25, 2020

To test install the oc10 graphapi app in an oc instance, then replace the url with your instance in this line

bin/ocis-glauth --log-level debug server --backend-server https://cloud.example.com

query the givenname of all your users like this

ldapsearch -x -H ldap://localhost:9125 -b dc=owncloud,dc=com -D "cn=<loginname>,dc=owncloud,dc=com" -W givenName

replace <loginname> with you login, eg admin ... ldapsearch will ask for your password and you should see the users displayname / givenname. try fetching groups with

 ldapsearch -x -H ldap://localhost:9125 -b dc=owncloud,dc=com -D "cn=<loginname>,dc=owncloud,dc=com" objectclass=posixaccount -W

🚀

This PR

  • adds config flags for glauth ldap ports and the backend
  • add config options for the http port of glauth
  • add config options for the ldaps cert and key
  • by default uses https://demo.owncloud.com as the data store
    • but that does not have the graphapi app installed ...
  • when killing the server it neds to be killed hard and exits with
2020-02-25T14:55:41+01:00 INF Shutting down server service=glauth transport=http
2020-02-25T14:55:41+01:00 INF Shutting down server service=glauth transport=debug
^Cpanic: send on closed channel

goroutine 19 [running]:
os/signal.process(0x12a6a20, 0xc000264308)
        /usr/lib/go/src/os/signal/signal.go:227 +0x189
os/signal.loop()
        /usr/lib/go/src/os/signal/signal_unix.go:23 +0x3e
created by os/signal.init.0
        /usr/lib/go/src/os/signal/signal_unix.go:29 +0x41

may need some more tweaking upstream to cleanly kill the server by using a context ...

  • when not using the graphapi I only see the same user over and over in the list ...
ldapsearch -x -H ldap://localhost:9125 -b ou=users,dc=owncloud,dc=com -D "cn=jfd,ou=users,dc=owncloud,dc=com" -W 
Enter LDAP Password: 
# extended LDIF
#
# LDAPv3
# base <ou=users,dc=owncloud,dc=com> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# test2, users, owncloud.com
dn: cn=test2,ou=users,dc=owncloud,dc=com
cn: test2
uid: test2
objectClass: posixAccount
description: test2 from ownCloud

# test2, users, owncloud.com
dn: cn=test2,ou=users,dc=owncloud,dc=com
cn: test2
uid: test2
objectClass: posixAccount
description: test2 from ownCloud

.
.
.

# test2, users, owncloud.com
dn: cn=test2,ou=users,dc=owncloud,dc=com
cn: test2
uid: test2
objectClass: posixAccount
description: test2 from ownCloud

# search result
search: 2
result: 0 Success
  • when using the graphapi I don't seem to be able to list users
 ldapsearch -x -H ldap://localhost:9125 -b ou=users,dc=owncloud,dc=com -D "cn=jfd,ou=users,dc=owncloud,dc=com" -W  
Enter LDAP Password: 
# extended LDIF
#
# LDAPv3
# base <ou=users,dc=owncloud,dc=com> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# search result
search: 2
result: 1 Operations error

# numResponses: 1

@update-docs
Copy link

update-docs bot commented Feb 25, 2020

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@butonic butonic self-assigned this Feb 26, 2020
@butonic butonic added the enhancement New feature or request label Feb 26, 2020
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@butonic butonic requested a review from micbar February 28, 2020 13:33
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@micbar micbar merged commit d784b34 into master Feb 28, 2020
@delete-merged-branch delete-merged-branch bot deleted the start-glauth branch February 28, 2020 17:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants