[Security AI Assistant] Changed license to enterprise and added api privilege 'elasticAssistant' (#180644)

1. Changed AI Assistant API license check to be consistent with client.
2. Fixed API access issues
This commit is contained in:
Yuliia Naumenko 2024-04-11 20:25:05 -07:00 committed by GitHub
parent 8c357a1ccd
commit 755fb60db9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -26,7 +26,7 @@ export const getAssistantBaseKibanaFeature = (): BaseKibanaFeatureConfig => ({
minimumLicense: 'enterprise',
privileges: {
all: {
api: [],
api: ['elasticAssistant'],
app: [ASSISTANT_FEATURE_ID, 'kibana'],
catalogue: [APP_ID],
savedObject: {

View file

@ -33,4 +33,4 @@ export const CAPABILITIES = `${BASE_PATH}/capabilities`;
/**
Licensing requirements
*/
export const MINIMUM_AI_ASSISTANT_LICENSE = 'platinum' as const;
export const MINIMUM_AI_ASSISTANT_LICENSE = 'enterprise' as const;

View file

@ -61,7 +61,7 @@ const createMockConfig = () => ({});
const createAppClientMock = () => ({});
const license = licensingMock.createLicense({ license: { type: 'platinum' } });
const license = licensingMock.createLicense({ license: { type: 'enterprise' } });
const createRequestContextMock = (
clients: MockClients = createMockClients()
): ElasticAssistantRequestHandlerContextMock => {