* migration from organization to workspace on code level * updated a few more files * fixed runtime errors * update org settings URL * Renamed organizationId in domain objects * changed field named from organization to workspace * Reverted AppsmithRole changes * fixed migrations * recreating indexes * migration update * seed data runs before migration, undo changes * mock commit * seedmongo to populate upgraded data, datasource upgrade * fixed two test cases * updated migrations * updated prop name * Upgraded AclPermission * comment * migrated AppsmithRole * more changes * final set of changes * variable name changes * update cypress variable name * Update app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/ApplicationControllerCE.java * Update app/server/appsmith-interfaces/src/main/java/com/appsmith/external/models/Datasource.java Co-authored-by: Trisha Anand <trisha@appsmith.com> * reverting encryption handler change * migrated a few missed out org to workspace * migrated a few missed out org to workspace * migration changes * Removed Permission import * fixed AppsmithRole * mongodb version update * fixed compile error * fixed compile issue * fixed some tests * simplified embedded mongodb config * updated a cypress test Co-authored-by: Sidhant Goel <sidhant@appsmith.com> Co-authored-by: Trisha Anand <trisha@appsmith.com> Co-authored-by: Sidhant Goel <sidhant@hexcod.in>
107 lines
2.2 KiB
TypeScript
107 lines
2.2 KiB
TypeScript
import { Property } from "entities/Action";
|
|
|
|
export enum AuthType {
|
|
NONE = "dbAuth",
|
|
OAuth2 = "oAuth2",
|
|
basic = "basic",
|
|
apiKey = "apiKey",
|
|
bearerToken = "bearerToken",
|
|
}
|
|
|
|
export enum SSLType {
|
|
DEFAULT = "DEFAULT",
|
|
SELF_SIGNED_CERTIFICATE = "SELF_SIGNED_CERTIFICATE",
|
|
}
|
|
|
|
export enum ApiKeyAuthType {
|
|
QueryParams = "queryParams",
|
|
Header = "header",
|
|
}
|
|
|
|
export enum GrantType {
|
|
ClientCredentials = "client_credentials",
|
|
AuthorizationCode = "authorization_code",
|
|
}
|
|
|
|
export type Authentication =
|
|
| ClientCredentials
|
|
| AuthorizationCode
|
|
| Basic
|
|
| ApiKey
|
|
| BearerToken;
|
|
|
|
export interface Connection {
|
|
ssl: SSL;
|
|
}
|
|
|
|
export interface SSL {
|
|
authType: SSLType;
|
|
certificateFile: Certificate;
|
|
}
|
|
|
|
export interface Certificate {
|
|
name: string;
|
|
base64Content: string | ArrayBuffer | null;
|
|
}
|
|
|
|
export interface ApiDatasourceForm {
|
|
datasourceId: string;
|
|
pluginId: string;
|
|
workspaceId: string;
|
|
isValid: boolean;
|
|
url: string;
|
|
headers?: Property[];
|
|
queryParameters?: Property[];
|
|
isSendSessionEnabled: boolean;
|
|
sessionSignatureKey: string;
|
|
authType: AuthType;
|
|
authentication?: Authentication;
|
|
connection?: Connection;
|
|
}
|
|
|
|
export interface Oauth2Common {
|
|
authenticationType: AuthType.OAuth2;
|
|
accessTokenUrl: string;
|
|
clientId: string;
|
|
clientSecret: string;
|
|
headerPrefix: string;
|
|
scopeString: string;
|
|
isTokenHeader: boolean;
|
|
audience: string;
|
|
resource: string;
|
|
sendScopeWithRefreshToken: string;
|
|
refreshTokenClientCredentialsLocation: string;
|
|
}
|
|
|
|
export interface ClientCredentials extends Oauth2Common {
|
|
grantType: GrantType.ClientCredentials;
|
|
customTokenParameters: Property[];
|
|
}
|
|
|
|
export interface AuthorizationCode extends Oauth2Common {
|
|
grantType: GrantType.AuthorizationCode;
|
|
authorizationUrl: string;
|
|
customAuthenticationParameters: Property[];
|
|
isAuthorizationHeader: boolean;
|
|
isAuthorized: boolean;
|
|
}
|
|
|
|
export interface Basic {
|
|
authenticationType: AuthType.basic;
|
|
username: string;
|
|
password: string;
|
|
}
|
|
|
|
export interface ApiKey {
|
|
authenticationType: AuthType.apiKey;
|
|
label: string;
|
|
headerPrefix: string;
|
|
value: string;
|
|
addTo: string;
|
|
}
|
|
|
|
export interface BearerToken {
|
|
authenticationType: AuthType.bearerToken;
|
|
bearerToken: string;
|
|
}
|