Repository navigation
Description
ocis running here: https://ocis-bridge.owncloud.works
oc10 running here: https://oc10-bridge.owncloud.works
oc10
login to https://oc10-bridge.owncloud.works (owncloud 10) works for user felix, [email protected]
ocis web
When logging in to https://ocis-bridge.owncloud.works via ocis web getting error:
# request nr 1 to graphapi from admin
owncloud_1 | 192.168.96.2 - admin [08/Oct/2020:16:53:47 +0000] "GET /index.php/apps/graphapi/v1.0/ocs/v2.php/cloud/user?format=json HTTP/1.1" 302 968 "-" "Go-http-client/2.0"
owncloud_1 | 192.168.96.2 - admin [08/Oct/2020:16:53:47 +0000] "GET /login HTTP/1.1" 200 3113 "https://oc10-bridge.owncloud.works/index.php/apps/graphapi/v1.0/ocs/v2.php/cloud/user?format=json" "Go-http-client/2.0"
owncloud_1 | 192.168.96.2 - admin [08/Oct/2020:16:53:47 +0000] "GET /index.php/apps/graphapi/v1.0/users HTTP/1.1" 200 1297 "-" "Go-http-client/2.0"
# request nr 2 to graphapi from felix
owncloud_1 | 192.168.96.2 - felix [08/Oct/2020:16:53:47 +0000] "GET /index.php/apps/graphapi/v1.0/ocs/v2.php/cloud/user?format=json HTTP/1.1" 302 964 "-" "Go-http-client/2.0"
owncloud_1 | 192.168.96.2 - felix [08/Oct/2020:16:53:47 +0000] "GET /login HTTP/1.1" 200 3118 "https://oc10-bridge.owncloud.works/index.php/apps/graphapi/v1.0/ocs/v2.php/cloud/user?format=json" "Go-http-client/2.0"
# request nr 3 to graphapi from admin
owncloud_1 | 192.168.96.2 - admin [08/Oct/2020:16:53:47 +0000] "GET /index.php/apps/graphapi/v1.0/ocs/v2.php/cloud/user?format=json HTTP/1.1" 302 970 "-" "Go-http-client/2.0"
owncloud_1 | 192.168.96.2 - admin [08/Oct/2020:16:53:47 +0000] "GET /login HTTP/1.1" 200 3110 "https://oc10-bridge.owncloud.works/index.php/apps/graphapi/v1.0/ocs/v2.php/cloud/user?format=json" "Go-http-client/2.0"
owncloud_1 | 192.168.96.2 - admin [08/Oct/2020:16:53:47 +0000] "GET /index.php/apps/graphapi/v1.0/users/felix HTTP/1.1" 200 1162 "-" "Go-http-client/2.0"
# request nr 4 to graphapi from admin
owncloud_1 | 192.168.96.2 - admin [08/Oct/2020:16:54:50 +0000] "GET /index.php/apps/graphapi/v1.0/ocs/v2.php/cloud/user?format=json HTTP/1.1" 302 972 "-" "Go-http-client/2.0"
owncloud_1 | 192.168.96.2 - admin [08/Oct/2020:16:54:50 +0000] "GET /login HTTP/1.1" 200 3117 "https://oc10-bridge.owncloud.works/index.php/apps/graphapi/v1.0/ocs/v2.php/cloud/user?format=json" "Go-http-client/2.0"
owncloud_1 | 192.168.96.2 - admin [08/Oct/2020:16:54:50 +0000] "GET /index.php/apps/graphapi/v1.0/users/felix HTTP/1.1" 200 1162 "-" "Go-http-client/2.0"
# request nr 5 to graphapi from admin
owncloud_1 | 192.168.96.2 - admin [08/Oct/2020:16:54:50 +0000] "GET /index.php/apps/graphapi/v1.0/ocs/v2.php/cloud/user?format=json HTTP/1.1" 302 968 "-" "Go-http-client/2.0"
owncloud_1 | 192.168.96.2 - admin [08/Oct/2020:16:54:50 +0000] "GET /login HTTP/1.1" 200 3124 "https://oc10-bridge.owncloud.works/index.php/apps/graphapi/v1.0/ocs/v2.php/cloud/user?format=json" "Go-http-client/2.0"
owncloud_1 | 192.168.96.2 - admin [08/Oct/2020:16:54:50 +0000] "GET /index.php/apps/graphapi/v1.0/users/felix HTTP/1.1" 200 1158 "-" "Go-http-client/2.0"
# ocis still not happy
ocis_1 | 2020-10-08T16:54:51Z ERR Account not found query="mail eq '[email protected]'" service=proxy
ldapsearch
Searching via ldapsearch against glauth works and returns a single user like that:
ldapsearch -x -H ldap://localhost:9125 -D "cn=admin,dc=example,dc=org" -b "dc=example,dc=org" -W "(&(objectclass=posixaccount)([email protected]))"
produces
owncloud_1 | 192.168.96.2 - admin [08/Oct/2020:16:45:54 +0000] "GET /index.php/apps/graphapi/v1.0/ocs/v2.php/cloud/user?format=json HTTP/1.1" 302 968 "-" "Go-http-client/2.0"
owncloud_1 | 192.168.96.2 - admin [08/Oct/2020:16:45:54 +0000] "GET /login HTTP/1.1" 200 3119 "https://oc10-bridge.owncloud.works/index.php/apps/graphapi/v1.0/ocs/v2.php/cloud/user?format=json" "Go-http-client/2.0"
owncloud_1 | 192.168.96.2 - admin [08/Oct/2020:16:45:54 +0000] "GET /index.php/apps/graphapi/v1.0/users HTTP/1.1" 200 1295 "-" "Go-http-client/2.0"
result looks good:
# extended LDIF
#
# LDAPv3
# base <dc=example,dc=org> with scope subtree
# filter: (&(objectclass=posixaccount)([email protected]))
# requesting: ALL
#
# felix, users, example.org
dn: cn=felix,ou=users,dc=example,dc=org
cn: felix
uid: felix
givenName: felix
mail: [email protected]
objectClass: posixAccount
description: felix from ownCloud
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
graph api on co10
works nicely:
curl https://oc10-bridge.owncloud.works/index.php/apps/graphapi/v1.0/users -u admin | jq
Enter host password for user 'admin':
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 197 100 197 0 0 269 0 --:--:-- --:--:-- --:--:-- 269
{
"value": [
{
"id": "admin",
"displayName": "admin",
"mail": null
},
{
"id": "einstein",
"displayName": "einstein",
"mail": "[email protected]"
},
{
"id": "felix",
"displayName": "felix",
"mail": "[email protected]"
}
]
}
Activity
butonic commentedon Oct 8, 2020
how are you running glauth? when the backend data is owncloud the usegraphapi flag must be true to use the graph api. it seems your config has usegraphapi false. so it uses the ocs api but with the graphapi endpoints you configured.
the default flags look correct:
ocis/glauth/pkg/flagset/flagset.go
Lines 273 to 279 in d46d69e
if is passed on correctly:
ocis/glauth/pkg/command/server.go
Line 184 in d46d69e
I dont see how you start the service .... that is all the help I can give.
Cyb3rDudu commentedon Oct 8, 2020
Here is the compose file that we use in our setup
usegraphapi is definitely set to true
https://github.com/owncloud-docker/compose-playground/blob/master/examples/oc10-with-ocis-infra/docker-compose.yml
micbar commentedon Oct 8, 2020
@JamU85 @felixboehm If you are using ocis master, all
REVA_variables are now renamed toSTORAGE_The
REVA_*variables will have no effect on this config.Here is the always up-to-date config (gets parsed from the go config files) https://owncloud.github.io/extensions/storage/configuration/
Cyb3rDudu commentedon Oct 9, 2020
Proxy config file wasn't parsed properly, thats why policy selector was just default.