-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2248 from owncloud/claims-policy-selector
add claims and regex policy selector
- Loading branch information
Showing
14 changed files
with
563 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Enhancement: Proxy: Add claims policy selector | ||
|
||
Using the proxy config file, it is now possible to let let the IdP determine the routing policy by sending an `ocis.routing.policy` claim. Its value will be used to determine the set of routes for the logged in user. | ||
|
||
https://github.com/owncloud/ocis/pull/2248 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
{ | ||
"http": { | ||
"addr": "0.0.0.0:9200", | ||
"root": "/" | ||
}, | ||
"oidc": { | ||
"issuer": "https://localhost:9200", | ||
"insecure": true | ||
}, | ||
"policy_selector": { | ||
"regex": { | ||
"selector_cookie_name": "owncloud-selector", | ||
"default_policy": "oc10", | ||
"matches_policies": [ | ||
{"priority": 10, "property": "mail", "match": "[email protected]", "policy": "ocis"}, | ||
{"priority": 20, "property": "mail", "match": "[^@][email protected]", "policy": "oc10"}, | ||
{"priority": 30, "property": "username", "match": "(einstein|feynman)", "policy": "ocis"}, | ||
{"priority": 40, "property": "username", "match": ".+", "policy": "oc10"}, | ||
{"priority": 50, "property": "id", "match": "4c510ada-c86b-4815-8820-42cdf82c3d51", "policy": "ocis"}, | ||
{"priority": 60, "property": "id", "match": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c", "policy": "oc10"} | ||
], | ||
"unauthenticated_policy": "oc10" | ||
} | ||
}, | ||
"policies": [ | ||
{ | ||
"name": "ocis", | ||
"routes": [ | ||
{ | ||
"endpoint": "/", | ||
"backend": "http://localhost:9100" | ||
}, | ||
{ | ||
"endpoint": "/.well-known/", | ||
"backend": "http://localhost:9130" | ||
}, | ||
{ | ||
"endpoint": "/konnect/", | ||
"backend": "http://localhost:9130" | ||
}, | ||
{ | ||
"endpoint": "/signin/", | ||
"backend": "http://localhost:9130" | ||
}, | ||
{ | ||
"type": "regex", | ||
"endpoint": "/ocs/v[12].php/cloud/(users?|groups)", | ||
"backend": "http://localhost:9110" | ||
}, | ||
{ | ||
"endpoint": "/ocs/", | ||
"backend": "http://localhost:9140" | ||
}, | ||
{ | ||
"type": "query", | ||
"endpoint": "/remote.php/?preview=1", | ||
"backend": "http://localhost:9115" | ||
}, | ||
{ | ||
"endpoint": "/remote.php/", | ||
"backend": "http://localhost:9140" | ||
}, | ||
{ | ||
"endpoint": "/dav/", | ||
"backend": "http://localhost:9140" | ||
}, | ||
{ | ||
"endpoint": "/webdav/", | ||
"backend": "http://localhost:9140" | ||
}, | ||
{ | ||
"endpoint": "/status.php", | ||
"backend": "http://localhost:9140" | ||
}, | ||
{ | ||
"endpoint": "/index.php/", | ||
"backend": "http://localhost:9140" | ||
}, | ||
{ | ||
"endpoint": "/data", | ||
"backend": "http://localhost:9140" | ||
}, | ||
{ | ||
"endpoint": "/graph/", | ||
"backend": "http://localhost:9120" | ||
}, | ||
{ | ||
"endpoint": "/graph-explorer/", | ||
"backend": "http://localhost:9135" | ||
}, | ||
{ | ||
"endpoint": "/api/v0/accounts", | ||
"backend": "http://localhost:9181" | ||
}, | ||
{ | ||
"endpoint": "/accounts.js", | ||
"backend": "http://localhost:9181" | ||
}, | ||
{ | ||
"endpoint": "/api/v0/settings", | ||
"backend": "http://localhost:9190" | ||
}, | ||
{ | ||
"endpoint": "/settings.js", | ||
"backend": "http://localhost:9190" | ||
}, | ||
{ | ||
"endpoint": "/onlyoffice.js", | ||
"backend": "http://localhost:9220" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "oc10", | ||
"routes": [ | ||
{ | ||
"endpoint": "/", | ||
"backend": "http://localhost:9100" | ||
}, | ||
{ | ||
"endpoint": "/.well-known/", | ||
"backend": "http://localhost:9130" | ||
}, | ||
{ | ||
"endpoint": "/konnect/", | ||
"backend": "http://localhost:9130" | ||
}, | ||
{ | ||
"endpoint": "/signin/", | ||
"backend": "http://localhost:9130" | ||
}, | ||
{ | ||
"endpoint": "/ocs/", | ||
"backend": "https://demo.owncloud.com", | ||
"apache-vhost": true | ||
}, | ||
{ | ||
"endpoint": "/remote.php/", | ||
"backend": "https://demo.owncloud.com", | ||
"apache-vhost": true | ||
}, | ||
{ | ||
"endpoint": "/dav/", | ||
"backend": "https://demo.owncloud.com", | ||
"apache-vhost": true | ||
}, | ||
{ | ||
"endpoint": "/webdav/", | ||
"backend": "https://demo.owncloud.com", | ||
"apache-vhost": true | ||
}, | ||
{ | ||
"endpoint": "/status.php", | ||
"backend": "https://demo.owncloud.com" | ||
}, | ||
{ | ||
"endpoint": "/index.php/", | ||
"backend": "https://demo.owncloud.com" | ||
}, | ||
{ | ||
"endpoint": "/data", | ||
"backend": "https://demo.owncloud.com", | ||
"apache-vhost": true | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.