Skip to content

Commit

Permalink
Merge pull request #394 from 3scale/oidc-issuer-null
Browse files Browse the repository at this point in the history
[remote_v2] do not try to load oidc when issuer is null
  • Loading branch information
mikz authored Jul 21, 2017
2 parents 48f0756 + 940b1e9 commit 569a515
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apicast/src/configuration.lua
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ function _M.parse_service(service)
host = backend_host_override or backend.host
},
oidc = {
issuer_endpoint = proxy.oidc_issuer_endpoint
issuer_endpoint = proxy.oidc_issuer_endpoint ~= ngx.null and proxy.oidc_issuer_endpoint
},
credentials = {
location = proxy.credentials_location or 'query',
Expand Down
2 changes: 1 addition & 1 deletion apicast/src/configuration_loader/remote_v2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function _M:oidc_issuer_configuration(service)

local endpoint = service.oidc.issuer_endpoint

if not endpoint then
if not endpoint or endpoint == ngx.null then
return nil, 'no OIDC endpoint'
end

Expand Down
2 changes: 1 addition & 1 deletion spec/configuration_loader/remote_v2_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('Configuration Remote Loader V2', function()
proxy_config = {
version = 13,
environment = 'sandbox',
content = { id = 42, backend_version = 1 }
content = { id = 42, backend_version = 1, proxy = { oidc_issuer_endpoint = ngx.null } }
}
}
) }
Expand Down

0 comments on commit 569a515

Please sign in to comment.