Skip to content

Commit

Permalink
Merge branch 'master' into fix/load-unknown-job-types
Browse files Browse the repository at this point in the history
  • Loading branch information
bernd authored Feb 13, 2025
2 parents 4a38b10 + 6797dec commit c70546a
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 30 deletions.
2 changes: 1 addition & 1 deletion graylog2-web-interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"@tanstack/query-sync-storage-persister": "^4.33.0",
"@tanstack/react-query-persist-client": "^4.33.0",
"@yornaath/batshit": "^0.10.1",
"ace-builds": "1.37.5",
"ace-builds": "1.38.0",
"bootstrap": "3.4.1",
"bson-objectid": "^2.0.3",
"chroma-js": "^2.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* <http://www.mongodb.com/licensing/server-side-public-license>.
*/
import type * as React from 'react';
import type * as Immutable from 'immutable';
import type { FormikProps } from 'formik';

import type AuthenticationBackend from 'logic/authentication/AuthenticationBackend';
import type {
Expand All @@ -32,11 +34,11 @@ export interface DirectoryServiceAuthenticationService {
displayName: string;
createComponent: React.ComponentType<{}>;
editComponent: React.ComponentType<{
authenticationBackend: typeof DirectoryServiceBackend | typeof OktaBackendConfig;
authenticationBackend: AuthenticationBackend | DirectoryServiceBackend | OktaBackendConfig;
initialStepKey: string | null | undefined;
}>;
configDetailsComponent: React.ComponentType<{
authenticationBackend: typeof AuthenticationBackend | typeof OktaBackend;
authenticationBackend: DirectoryServiceBackend | AuthenticationBackend | OktaBackend;
roles?: Immutable.List<Role>;
}>;
configToJson: (config: {}) => DirectoryServiceBackendConfigJson;
Expand Down Expand Up @@ -81,7 +83,7 @@ interface Backend {
excludedFields: { [field: string]: boolean };
}

interface DirectoryServicesGroupSync {
export interface DirectoryServicesGroupSync {
actions: {
onDirectoryServiceBackendUpdate: (
backendGroupSyncIsActive: boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* <http://www.mongodb.com/licensing/server-side-public-license>.
*/
import * as Immutable from 'immutable';
import type { $PropertyType } from 'utility-types';

import type { DirectoryServiceAuthenticationService } from 'components/authentication/types';
import { getAuthServicePlugin } from 'util/AuthenticationService';
Expand All @@ -42,7 +41,7 @@ export type AuthenticationBackendJSON = {
config: DirectoryServiceBackendConfig | OktaBackendConfig;
};

const configFromJson = (config: $PropertyType<AuthenticationBackendJSON, 'config'>) => {
const configFromJson = (config: AuthenticationBackendJSON['config']) => {
const authService = getAuthServicePlugin((config as TypedConfig).type, true);

if (authService && typeof authService.configFromJson === 'function') {
Expand All @@ -52,7 +51,7 @@ const configFromJson = (config: $PropertyType<AuthenticationBackendJSON, 'config
return config;
};

const configToJson = (config: $PropertyType<AuthenticationBackendJSON, 'config'>) => {
const configToJson = (config: AuthenticationBackendJSON['config']) => {
const authService = getAuthServicePlugin((config as TypedConfig).type, true);

if (authService && typeof authService.configToJson === 'function') {
Expand All @@ -66,11 +65,11 @@ export default class AuthenticationBackend {
_value: InternalState;

constructor(
id: $PropertyType<InternalState, 'id'>,
title: $PropertyType<InternalState, 'title'>,
description: $PropertyType<InternalState, 'description'>,
defaultRoles: $PropertyType<InternalState, 'defaultRoles'>,
config: $PropertyType<InternalState, 'config'>,
id: InternalState['id'],
title: InternalState['title'],
description: InternalState['description'],
defaultRoles: InternalState['defaultRoles'],
config: InternalState['config'],
) {
this._value = {
id,
Expand All @@ -81,23 +80,23 @@ export default class AuthenticationBackend {
};
}

get id(): $PropertyType<InternalState, 'id'> {
get id(): InternalState['id'] {
return this._value.id;
}

get title(): $PropertyType<InternalState, 'title'> {
get title(): InternalState['title'] {
return this._value.title;
}

get description(): $PropertyType<InternalState, 'description'> {
get description(): InternalState['description'] {
return this._value.description;
}

get defaultRoles(): $PropertyType<InternalState, 'defaultRoles'> {
get defaultRoles(): InternalState['defaultRoles'] {
return this._value.defaultRoles;
}

get config(): $PropertyType<InternalState, 'config'> {
get config(): InternalState['config'] {
return this._value.config;
}

Expand Down Expand Up @@ -153,23 +152,23 @@ class Builder {
this.value = value;
}

id(value: $PropertyType<InternalState, 'id'>): Builder {
id(value: InternalState['id']): Builder {
return new Builder(this.value.set('id', value));
}

title(value: $PropertyType<InternalState, 'title'>): Builder {
title(value: InternalState['title']): Builder {
return new Builder(this.value.set('title', value));
}

description(value: $PropertyType<InternalState, 'description'>): Builder {
description(value: InternalState['description']): Builder {
return new Builder(this.value.set('description', value));
}

defaultRoles(value: $PropertyType<InternalState, 'defaultRoles'>): Builder {
defaultRoles(value: InternalState['defaultRoles']): Builder {
return new Builder(this.value.set('defaultRoles', value));
}

config(value: $PropertyType<InternalState, 'config'>): Builder {
config(value: InternalState['config']): Builder {
return new Builder(this.value.set('config', value));
}

Expand Down
16 changes: 8 additions & 8 deletions graylog2-web-interface/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4061,10 +4061,10 @@ accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8:
mime-types "~2.1.34"
negotiator "0.6.3"

ace-builds@1.37.5, ace-builds@^1.36.3:
version "1.37.5"
resolved "https://registry.yarnpkg.com/ace-builds/-/ace-builds-1.37.5.tgz#8cf3c3a2e869f32a193d314c8f4346e6218bfdae"
integrity sha512-VMJ4Cnhq6L9dwvOCyuyyvQuiVTSwdZC7zDKJBBBJJax0wGQ7MvzQZFoi0gMmCm2I4Zuv/ZbtwU/dlglIhCNLhw==
ace-builds@1.38.0, ace-builds@^1.36.3:
version "1.38.0"
resolved "https://registry.yarnpkg.com/ace-builds/-/ace-builds-1.38.0.tgz#15dd67e3223edfc5ec73c01051ac3d4647e8888a"
integrity sha512-5W3B5/5Rl/dAsp7Fb6xXOc6bCYln+4qOnpQHh4OpxZSoDsp1KFiu5lA3TJBr8/5DQu6+8rlduCGecMSnKuU2MQ==

acorn-globals@^4.1.0:
version "4.3.4"
Expand Down Expand Up @@ -7611,7 +7611,7 @@ [email protected]:
eslint-config-prettier "10.0.1"
eslint-import-resolver-webpack "0.13.10"
eslint-plugin-compat "6.0.2"
eslint-plugin-graylog "file:../../../../.cache/yarn/v6/npm-eslint-config-graylog-1.3.0-d3278d02-ea19-4231-a366-3b8acc16f80c-1739443568892/node_modules/eslint-plugin-graylog"
eslint-plugin-graylog "file:packages/eslint-plugin-graylog"
eslint-plugin-import "2.25.3"
eslint-plugin-jest "28.11.0"
eslint-plugin-jest-dom "5.5.0"
Expand Down Expand Up @@ -9220,12 +9220,12 @@ graphemer@^1.4.0:
"@tanstack/react-query" "4.36.1"
"@types/jquery" "3.5.32"
"@types/react" "18.3.13"
babel-preset-graylog "file:../../../../.cache/yarn/v6/npm-graylog-web-plugin-6.2.0-SNAPSHOT-c2638eeb-8ef2-4ab8-bf31-a63730ab7713-1739443568804/node_modules/babel-preset-graylog"
eslint-config-graylog "file:../../../../.cache/yarn/v6/npm-graylog-web-plugin-6.2.0-SNAPSHOT-c2638eeb-8ef2-4ab8-bf31-a63730ab7713-1739443568804/node_modules/eslint-config-graylog"
babel-preset-graylog "file:packages/babel-preset-graylog"
eslint-config-graylog "file:packages/eslint-config-graylog"
formik "2.4.6"
history "^5.3.0"
html-webpack-plugin "^5.5.0"
jest-preset-graylog "file:../../../../.cache/yarn/v6/npm-graylog-web-plugin-6.2.0-SNAPSHOT-c2638eeb-8ef2-4ab8-bf31-a63730ab7713-1739443568804/node_modules/jest-preset-graylog"
jest-preset-graylog "file:packages/jest-preset-graylog"
jquery "3.7.1"
moment "2.30.1"
moment-timezone "0.5.47"
Expand Down
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,14 @@
<artifactId>json-path</artifactId>
<version>${json-path.version}</version>
</dependency>
<!-- Manage json-smart to version >= 2.5.2 to address CVE-2024-57699. json-smart is only used as a
transitive dependency (e.g. for json-path), so when updating the version here, check if we still need
to manage the version ourselves. -->
<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
Expand Down

0 comments on commit c70546a

Please sign in to comment.