Skip to content

Commit

Permalink
dont check for the reserved realm
Browse files Browse the repository at this point in the history
  • Loading branch information
legrego committed Sep 3, 2020
1 parent d494f1e commit bf0ec1a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 20 deletions.
4 changes: 0 additions & 4 deletions x-pack/test/api_integration/apis/security/basic_login.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,6 @@ export default function ({ getService }) {
]);
expect(apiResponse.body.username).to.be(validUsername);
expect(apiResponse.body.authentication_provider).to.eql('__http__');
expect(apiResponse.body.authentication_realm).to.eql({
name: 'reserved',
type: 'reserved',
});
expect(apiResponse.body.authentication_type).to.be('realm');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ export default function ({ getService }: FtrProviderContext) {
.expect(200);

expect(user.username).to.eql(username);
expect(user.authentication_realm).to.eql({ name: 'reserved', type: 'reserved' });
expect(user.authentication_provider).to.eql('basic');
expect(user.authentication_type).to.eql('realm');
});
Expand Down
19 changes: 7 additions & 12 deletions x-pack/test/login_selector_api_integration/apis/login_selector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function ({ getService }: FtrProviderContext) {
sessionCookie: Cookie,
username: string,
providerName: string,
authenticationRealm: { name: string; type: string },
authenticationRealm: { name: string; type: string } | null,
authenticationType: string
) {
expect(sessionCookie.key).to.be('sid');
Expand Down Expand Up @@ -67,7 +67,9 @@ export default function ({ getService }: FtrProviderContext) {

expect(apiResponse.body.username).to.be(username);
expect(apiResponse.body.authentication_provider).to.be(providerName);
expect(apiResponse.body.authentication_realm).to.eql(authenticationRealm);
if (authenticationRealm) {
expect(apiResponse.body.authentication_realm).to.eql(authenticationRealm);
}
expect(apiResponse.body.authentication_type).to.be(authenticationType);
}

Expand Down Expand Up @@ -228,16 +230,9 @@ export default function ({ getService }: FtrProviderContext) {
const basicSessionCookie = request.cookie(
basicAuthenticationResponse.headers['set-cookie'][0]
)!;
await checkSessionCookie(
basicSessionCookie,
'elastic',
'basic1',
{
name: 'reserved',
type: 'reserved',
},
'realm'
);
// Skip auth provider check since this comes from the reserved realm,
// which is not available when running on ESS
await checkSessionCookie(basicSessionCookie, 'elastic', 'basic1', null, 'realm');

const authenticationResponse = await supertest
.post('/api/security/saml/callback')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export default function ({ getService }: FtrProviderContext) {
.expect(200);

expect(user.username).to.eql(username);
expect(user.authentication_realm).to.eql({ name: 'reserved', type: 'reserved' });
expect(user.authentication_provider).to.eql('basic');
expect(user.authentication_type).to.be('realm');
});
Expand Down
1 change: 0 additions & 1 deletion x-pack/test/pki_api_integration/apis/security/pki_auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ export default function ({ getService }: FtrProviderContext) {
.expect(200);

expect(user.username).to.eql(username);
expect(user.authentication_realm).to.eql({ name: 'reserved', type: 'reserved' });
expect(user.authentication_provider).to.eql('basic');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ export default function ({ getService }: FtrProviderContext) {
.expect(200);

expect(user.username).to.eql(username);
expect(user.authentication_realm).to.eql({ name: 'reserved', type: 'reserved' });
expect(user.authentication_provider).to.eql('basic');
expect(user.authentication_type).to.be('realm');
});
Expand Down

0 comments on commit bf0ec1a

Please sign in to comment.