Skip to content

Commit

Permalink
fix(tests, interactive setup): switch interactive setup tests config …
Browse files Browse the repository at this point in the history
…to non-deprecated `secure_password` setting (elastic#205208)

## Summary

Switch interactive setup tests config to non-deprecated
`secure_password` setting as was flagged in
elastic/kibana-team#1173 (comment)
  • Loading branch information
azasypkin authored Dec 27, 2024
1 parent 2a63063 commit 5e8b61f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/kbn-es/src/settings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const mockSettings = [
'xpack.security.authc.realms.oidc.oidc1.rp.client_secret=secret',
'xpack.security.authc.realms.oidc.oidc1.rp.client_id=client id',
'xpack.security.authc.realms.jwt.jwt1.client_authentication.shared_secret=jwt_secret',
'xpack.security.http.ssl.keystore.secure_password=some_password',
'discovery.type=single-node',
];

Expand All @@ -23,6 +24,7 @@ test('`parseSettings` parses and returns all settings by default', () => {
['xpack.security.authc.realms.oidc.oidc1.rp.client_secret', 'secret'],
['xpack.security.authc.realms.oidc.oidc1.rp.client_id', 'client id'],
['xpack.security.authc.realms.jwt.jwt1.client_authentication.shared_secret', 'jwt_secret'],
['xpack.security.http.ssl.keystore.secure_password', 'some_password'],
['discovery.type', 'single-node'],
]);
});
Expand All @@ -33,6 +35,7 @@ test('`parseSettings` parses and returns all settings with `SettingsFilter.All`
['xpack.security.authc.realms.oidc.oidc1.rp.client_secret', 'secret'],
['xpack.security.authc.realms.oidc.oidc1.rp.client_id', 'client id'],
['xpack.security.authc.realms.jwt.jwt1.client_authentication.shared_secret', 'jwt_secret'],
['xpack.security.http.ssl.keystore.secure_password', 'some_password'],
['discovery.type', 'single-node'],
]);
});
Expand All @@ -41,6 +44,7 @@ test('`parseSettings` parses and returns only secure settings with `SettingsFilt
expect(parseSettings(mockSettings, { filter: SettingsFilter.SecureOnly })).toEqual([
['xpack.security.authc.realms.oidc.oidc1.rp.client_secret', 'secret'],
['xpack.security.authc.realms.jwt.jwt1.client_authentication.shared_secret', 'jwt_secret'],
['xpack.security.http.ssl.keystore.secure_password', 'some_password'],
]);
});

Expand Down
1 change: 1 addition & 0 deletions packages/kbn-es/src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
const SECURE_SETTINGS_LIST = [
/^xpack\.security\.authc\.realms\.oidc\.[a-zA-Z0-9_]+\.rp\.client_secret$/,
/^xpack\.security\.authc\.realms\.jwt\.[a-zA-Z0-9_]+\.client_authentication\.shared_secret$/,
/^xpack\.security\.http\.ssl\.keystore\.secure_password$/,
];

function isSecureSetting(settingName: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
...manualConfigurationFlowTestsConfig.get('esTestCluster.serverArgs'),
'xpack.security.enrollment.enabled=true',
`xpack.security.http.ssl.keystore.path=${caPath}`,
'xpack.security.http.ssl.keystore.password=storepass',
'xpack.security.http.ssl.keystore.secure_password=storepass',
],
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
...manualConfigurationConfig.get('esTestCluster.serverArgs'),
'xpack.security.enrollment.enabled=true',
`xpack.security.http.ssl.keystore.path=${caPath}`,
'xpack.security.http.ssl.keystore.password=storepass',
'xpack.security.http.ssl.keystore.secure_password=storepass',
],
},

Expand Down

0 comments on commit 5e8b61f

Please sign in to comment.