owncloud / ocis-glauth Goto Github PK
View Code? Open in Web Editor NEW:atom_symbol: GLAuth for OCIS
Home Page: https://owncloud.github.io/extensions/ocis_glauth/
License: Apache License 2.0
:atom_symbol: GLAuth for OCIS
Home Page: https://owncloud.github.io/extensions/ocis_glauth/
License: Apache License 2.0
When running EOS the OS needs to look up the user by the numeric uid. This fails with the glauth ocis-accounts backend:
ldapsearch -x -H ldap://localhost:9125 -b dc=example,dc=org -D "cn=reva,dc=example,dc=org" -w reva '(&(objectclass=posixAccount)(uidnumber=20000))'
# extended LDIF
#
# LDAPv3
# base <dc=example,dc=org> with scope subtree
# filter: (&(objectclass=posixAccount)(uidnumber=20000))
# requesting: ALL
#
# search result
search: 2
result: 0 Success
# numResponses: 1
might be an ocis-accounts problem
server log
2020-07-24T18:00:18+02:00 DBG Bind request basedn=dc=example,dc=org binddn=cn=reva,dc=example,dc=org service=glauth src={"IP":"::1","Port":52050,"Zone":""}
2020-07-24T18:00:18+02:00 DBG using query query={"conjuncts":[{"field":"bleve_type","term":"account"},{"field":"on_premises_sam_account_name","term":"reva"}]} service=accounts
2020-07-24T18:00:18+02:00 DBG result result={"facets":null,"hits":[{"id":"bc596f3c-c955-4328-80a0-60d018b4ad57","index":"/var/tmp/ocis-accounts/index.bleve","score":3.4921022015832683,"sort":["_score"]}],"max_score":3.4921022015832683,"request":{"explain":false,"facets":null,"fields":null,"from":0,"highlight":null,"includeLocations":false,"query":{"conjuncts":[{"field":"bleve_type","term":"account"},{"field":"on_premises_sam_account_name","term":"reva"}]},"search_after":null,"search_before":null,"size":10,"sort":["-_score"]},"status":{"failed":0,"successful":1,"total":1},"took":31318,"total_hits":1} service=accounts
2020-07-24T18:00:18+02:00 DBG found account account={"accountEnabled":true,"displayName":"Reva Inter Operability Platform","gidNumber":"15000","id":"bc596f3c-c955-4328-80a0-60d018b4ad57","mail":"[email protected]","memberOf":[{"id":"34f38767-c937-4eb6-b847-1c175829a2a0"}],"onPremisesSamAccountName":"reva","passwordProfile":{"password":"***REMOVED***"},"preferredName":"reva","uidNumber":"10001"} service=accounts
2020-07-24T18:00:18+02:00 DBG Bind success binddn=cn=reva,dc=example,dc=org service=glauth src={"IP":"::1","Port":52050,"Zone":""}
2020-07-24T18:00:18+02:00 DBG Search request basedn=dc=example,dc=org binddn=cn=reva,dc=example,dc=org filter=(&(objectclass=posixAccount)(uidnumber=20000)) service=glauth src={"IP":"::1","Port":52050,"Zone":""}
2020-07-24T18:00:18+02:00 DBG parsed query basedn=dc=example,dc=org binddn=cn=reva,dc=example,dc=org filter=(&(objectclass=posixAccount)(uidnumber=20000)) qtype=users query="uid_number eq '20000'" service=glauth
2020-07-24T18:00:18+02:00 DBG using query query={"conjuncts":[{"field":"bleve_type","term":"account"},{"field":"uid_number","term":"20000"}]} service=accounts
2020-07-24T18:00:18+02:00 DBG result result={"facets":null,"hits":[],"max_score":0,"request":{"explain":false,"facets":null,"fields":null,"from":0,"highlight":null,"includeLocations":false,"query":{"conjuncts":[{"field":"bleve_type","term":"account"},{"field":"uid_number","term":"20000"}]},"search_after":null,"search_before":null,"size":10,"sort":["-_score"]},"status":{"failed":0,"successful":1,"total":1},"took":25814,"total_hits":0} service=accounts
2020-07-24T18:00:18+02:00 DBG AP: Search OK basedn=dc=example,dc=org binddn=cn=reva,dc=example,dc=org filter=(&(objectclass=posixAccount)(uidnumber=20000)) service=glauth src={"IP":"::1","Port":52050,"Zone":""}
When trying to create a hybrid/bridge setup with oC 10 and OCIS beta5 single binary to authenticate local oC 10 users against ocis-konnectd
using OIDC you have to tell ocis-glauth
to use the oC10 graphapi
backend datastore using GLAUTH_BACKEND_DATASTORE=owncloud
, among others.
Steps to reproduce
Launch the beta5 single binary with GLAUTH_BACKEND_DATASTORE=owncloud ./ocis-1.0.0beta5-linux-amd64 server
Expected behavior
OCIS starts all services and ocis-glauth
can access the oC 10 user backend via graphapi
if the environment is properly configured.
Actual behavior
OCIS starts all services but ocis-glauth
won't start and loops with
2020-06-09T19:47:10+02:00 INF Written ldap.key service=glauth
panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
github.com/glauth/glauth/pkg/handler.NewOwnCloudHandler(0xc000d63448, 0x2, 0x2, 0x291c5c0, 0xc00154be00)
/srv/app/pkg/mod/github.com/glauth/[email protected]/pkg/handler/owncloud.go:316 +0x217
github.com/glauth/glauth/pkg/server.NewServer(0xc000d636f0, 0x2, 0x2, 0x8, 0x28db7a0, 0xc0015ae640)
/srv/app/pkg/mod/github.com/glauth/[email protected]/pkg/server/server.go:50 +0x2b6
github.com/owncloud/ocis-glauth/pkg/command.Server.func2(0xc00154bd00, 0x0, 0x0)
/srv/app/pkg/mod/github.com/owncloud/[email protected]/pkg/command/server.go:257 +0x724
github.com/micro/cli/v2.HandleAction(0x201b8e0, 0xc0015ae630, 0xc00154bd00, 0x0, 0xc000d38d70)
/srv/app/pkg/mod/github.com/micro/cli/[email protected]/app.go:540 +0x119
github.com/owncloud/ocis/pkg/command.GLAuthCommand.func1(0xc00154bd00, 0x18, 0x30)
/drone/src/pkg/command/glauth.go:22 +0x9d
github.com/micro/cli/v2.(*Command).Run(0xc0000b9200, 0xc00154b6c0, 0x0, 0x0)
/srv/app/pkg/mod/github.com/micro/cli/[email protected]/command.go:161 +0x4b9
github.com/micro/cli/v2.(*App).RunContext(0xc000092480, 0x290db60, 0xc000042198, 0xc00000e080, 0x2, 0x2, 0x0, 0x0)
/srv/app/pkg/mod/github.com/micro/cli/[email protected]/app.go:303 +0x790
github.com/micro/cli/v2.(*App).Run(...)
/srv/app/pkg/mod/github.com/micro/cli/[email protected]/app.go:210
github.com/owncloud/ocis/pkg/command.Execute(0x3d180, 0xc0000480b8)
/drone/src/pkg/command/root.go:53 +0xa9c
main.main()
/drone/src/cmd/ocis/main.go:10 +0x22
For testing we should supply a default config that contains the known demo users
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.