Skip to content

Commit

Permalink
[7.8] Partial revert of "Sync Kerberos + Anonymous access tests with …
Browse files Browse the repository at this point in the history
…the latest `security/_authenticate` API (user roles now include roles of anonymous user)." (#68624) (#68742)
  • Loading branch information
azasypkin authored Jun 10, 2020
1 parent 07f801e commit ffa479d
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ export default function ({ getService }: FtrProviderContext) {
});

describe('finishing SPNEGO', () => {
// Skipped: https://github.com/elastic/kibana/issues/68720
it.skip('should properly set cookie and authenticate user', async () => {
it('should properly set cookie and authenticate user', async () => {
const response = await supertest
.get('/internal/security/me')
.set('Authorization', `Negotiate ${spnegoToken}`)
Expand All @@ -116,14 +115,7 @@ export default function ({ getService }: FtrProviderContext) {
const sessionCookie = request.cookie(cookies[0])!;
checkCookieIsSet(sessionCookie);

const isAnonymousAccessEnabled = (config.get(
'esTestCluster.serverArgs'
) as string[]).some((setting) => setting.startsWith('xpack.security.authc.anonymous'));

// `superuser_anonymous` role is derived from the enabled anonymous access.
const expectedUserRoles = isAnonymousAccessEnabled
? ['kibana_admin', 'superuser_anonymous']
: ['kibana_admin'];
const expectedUserRoles = ['kibana_admin'];

await supertest
.get('/internal/security/me')
Expand Down

0 comments on commit ffa479d

Please sign in to comment.