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

Anonymous User Authentication Failing #87775

Closed
jaronoff97 opened this issue Jan 8, 2021 · 4 comments
Closed

Anonymous User Authentication Failing #87775

jaronoff97 opened this issue Jan 8, 2021 · 4 comments
Labels
Feature:Security/Authentication Platform Security - Authentication Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!

Comments

@jaronoff97
Copy link

Kibana version: 7.10.1

Elasticsearch version: 7.10.1

Server OS version: EKS v1.18.9-eks-d1db3c

Browser version: N/A

Browser OS version: N/A

Original install method (e.g. download page, yum, from source, etc.): ECK operator

Describe the bug:
I'm attempting to use the new method for anonymous authentication method as described by this PR: #84074

When I deploy the changes, however, I get these errors from Kibana:

 FATAL  Error: [config validation of [xpack.security].authc.providers]: types that failed validation:
- [config validation of [xpack.security].authc.providers.0]: expected value of type [array] but got [Object]
- [config validation of [xpack.security].authc.providers.1.anonymous]: definition for this key is missing

Steps to reproduce:

  1. Install the ECK operator in a Kubernetes cluster
  2. Create an ES cluster
  3. Use the following Kibana spec:
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
  name: kibana-test
spec:
  version: 7.10.1
  count: 1
  elasticsearchRef:
    name: es-test
  http:
    tls:
      selfSignedCertificate:
        disabled: true
  config:
    xpack.security.authc.providers:
    - anonymous.anonymous1:
      credentials:
        username: "anonymous_service_account"
        password: "anonymous_service_account_password"
  1. View logs for kibana pod to see above error

Expected behavior:

Screenshots (if relevant):

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

{"type":"log","@timestamp":"2021-01-07T23:03:49Z","tags":["fatal","root"],"pid":6,"message":"{ Error: [config validation of [xpack.security].authc.providers]: types that failed validation:\n- [config validation of [xpack.security].authc.providers.0]: expected value of type [array] but got [Object]\n- [config validation of [xpack.security].authc.providers.1.anonymous]: definition for this key is missing\n    at ObjectType.validate (/usr/share/kibana/node_modules/@kbn/config-schema/target/out/types/type.js:62:19)\n    at ConfigService.validateAtPath (/usr/share/kibana/node_modules/@kbn/config/target/config_service.js:165:23)\n    at MapSubscriber.getDistinctConfig.pipe.operators_1.map [as project] (/usr/share/kibana/node_modules/@kbn/config/target/config_service.js:172:83)\n    at MapSubscriber._next (/usr/share/kibana/node_modules/rxjs/internal/operators/map.js:49:35)\n    at MapSubscriber.Subscriber.next (/usr/share/kibana/node_modules/rxjs/internal/Subscriber.js:66:18)\n    at DistinctUntilChangedSubscriber._next (/usr/share/kibana/node_modules/rxjs/internal/operators/distinctUntilChanged.js:69:30)\n    at DistinctUntilChangedSubscriber.Subscriber.next (/usr/share/kibana/node_modules/rxjs/internal/Subscriber.js:66:18)\n    at MapSubscriber._next (/usr/share/kibana/node_modules/rxjs/internal/operators/map.js:55:26)\n    at MapSubscriber.Subscriber.next (/usr/share/kibana/node_modules/rxjs/internal/Subscriber.js:66:18)\n    at ReplaySubject._subscribe (/usr/share/kibana/node_modules/rxjs/internal/ReplaySubject.js:76:28)\n    at ReplaySubject.Observable._trySubscribe (/usr/share/kibana/node_modules/rxjs/internal/Observable.js:44:25)\n    at ReplaySubject.Subject._trySubscribe (/usr/share/kibana/node_modules/rxjs/internal/Subject.js:102:51)\n    at ReplaySubject.Observable.subscribe (/usr/share/kibana/node_modules/rxjs/internal/Observable.js:30:22)\n    at MapSubscriber.shareReplayOperation (/usr/share/kibana/node_modules/rxjs/internal/operators/shareReplay.js:48:32)\n    at Observable.subscribe (/usr/share/kibana/node_modules/rxjs/internal/Observable.js:25:31)\n    at MapOperator.call (/usr/share/kibana/node_modules/rxjs/internal/operators/map.js:32:23)\n  cause:\n   { Error: types that failed validation:\n       at UnionType.handleError (/usr/share/kibana/node_modules/@kbn/config-schema/target/out/types/union_type.js:37:24)\n       at UnionType.onError (/usr/share/kibana/node_modules/@kbn/config-schema/target/out/types/type.js:80:40)\n       at internals.Alternatives.Type.schema.error (/usr/share/kibana/node_modules/@kbn/config-schema/target/out/types/type.js:52:53)\n       at finish (/usr/share/kibana/node_modules/joi/lib/types/any/index.js:529:50)\n       at internals.Alternatives._validate (/usr/share/kibana/node_modules/joi/lib/types/any/index.js:618:24)\n       at type._base (/usr/share/kibana/node_modules/joi/lib/types/object/index.js:212:45)\n       at type._validate (/usr/share/kibana/node_modules/joi/lib/types/any/index.js:614:37)\n       at type._base (/usr/share/kibana/node_modules/joi/lib/types/object/index.js:212:45)\n       at type._validate (/usr/share/kibana/node_modules/joi/lib/types/any/index.js:614:37)\n       at type._validateWithOptions (/usr/share/kibana/node_modules/joi/lib/types/any/index.js:674:29)\n       at module.exports.internals.Any.root.validate (/usr/share/kibana/node_modules/joi/lib/index.js:146:23)\n       at ObjectType.validate (/usr/share/kibana/node_modules/@kbn/config-schema/target/out/types/type.js:57:72)\n       at ConfigService.validateAtPath (/usr/share/kibana/node_modules/@kbn/config/target/config_service.js:165:23)\n       at MapSubscriber.getDistinctConfig.pipe.operators_1.map [as project] (/usr/share/kibana/node_modules/@kbn/config/target/config_service.js:172:83)\n       at MapSubscriber._next (/usr/share/kibana/node_modules/rxjs/internal/operators/map.js:49:35)\n       at MapSubscriber.Subscriber.next (/usr/share/kibana/node_modules/rxjs/internal/Subscriber.js:66:18)\n     cause: undefined,\n     path: [ 'authc', 'providers' ],\n     errors: [ [SchemaTypeError], [SchemaTypeError] ] } }"}

 FATAL  Error: [config validation of [xpack.security].authc.providers]: types that failed validation:
- [config validation of [xpack.security].authc.providers.0]: expected value of type [array] but got [Object]
- [config validation of [xpack.security].authc.providers.1.anonymous]: definition for this key is missing

Any additional context:

@TinaHeiligers
Copy link
Contributor

@jaronoff97 the PR adds support for anonymous user auth only from version 7.11. 7.10.1 won't have the support.

@TinaHeiligers TinaHeiligers added Feature:Security/Authentication Platform Security - Authentication Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! labels Jan 8, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@jaronoff97
Copy link
Author

Ah! Apologies, I saw that the docs were live on the site, and must have misread the version! Thanks for the information. When is 7.11 going to be released?

@azasypkin
Copy link
Member

Ah! Apologies, I saw that the docs were live on the site, and must have misread the version! Thanks for the information. When is 7.11 going to be released?

Unfortunately we don't have/provide exact dates for the releases, but you can get a very rough idea if look at the dates of any consequent past minor releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Security/Authentication Platform Security - Authentication Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

No branches or pull requests

4 participants