Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove responseFactory from auth interceptor #59405

Open
mshustov opened this issue Mar 5, 2020 · 1 comment
Open

Remove responseFactory from auth interceptor #59405

mshustov opened this issue Mar 5, 2020 · 1 comment
Labels
Feature:New Platform Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@mshustov
Copy link
Contributor

mshustov commented Mar 5, 2020

In #41959 we added authRequired: 'optional' which changed a request termination logic for the next 2 cases:

  • redirect to IdP
  • notHandled (no valid credentials)

From now, redirect and notHandled logic performed by the core, depending on the current authRequired value. That makes responseFactory excessive, and we should remove it to provide the only way to redirect/reject an incoming request via authToolkit.

Reject interface might look like:

return t.failed({
  error: {...},
  statusCode?: number,
  responseHeaders: authenticationResult.authResponseHeaders,
});

to support cases when a request to Elasticsearch failed and we need to proxy an error to the client

@mshustov mshustov added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:New Platform labels Mar 5, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:New Platform Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

No branches or pull requests

2 participants