mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-04 01:09:36 +02:00
authorize: avoid serializing databroker data map to improve performance (#995)
This commit is contained in:
parent
7110948296
commit
3ad8cbf4ec
5 changed files with 104 additions and 29 deletions
|
@ -4,9 +4,9 @@ default allow = false
|
|||
|
||||
|
||||
route := first_allowed_route(input.http.url)
|
||||
session := input.databroker_data["type.googleapis.com/session.Session"][input.session.id]
|
||||
user := input.databroker_data["type.googleapis.com/user.User"][session.user_id]
|
||||
directory_user := input.databroker_data["type.googleapis.com/directory.User"][session.user_id]
|
||||
session := input.databroker_data.session
|
||||
user := input.databroker_data.user
|
||||
directory_user := input.databroker_data.directory_user
|
||||
|
||||
|
||||
# allow public
|
||||
|
|
|
@ -7,15 +7,11 @@ test_email_allowed {
|
|||
"allowed_users": ["x@example.com"]
|
||||
}] with
|
||||
input.databroker_data as {
|
||||
"type.googleapis.com/session.Session": {
|
||||
"session1": {
|
||||
"user_id": "user1"
|
||||
}
|
||||
},
|
||||
"type.googleapis.com/user.User": {
|
||||
"user1": {
|
||||
"email": "x@example.com"
|
||||
}
|
||||
"session": {
|
||||
"user_id": "user1"
|
||||
},
|
||||
"user": {
|
||||
"email": "x@example.com"
|
||||
}
|
||||
} with
|
||||
input.http as { "url": "http://example.com" } with
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue