Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HJ-7 - Add MicrosoftSQLServerMonitor support code #5404

Merged
merged 8 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import {
ConnectionType,
} from "~/types/api";

import MICROSOFT_SQL_SERVER_TYPE_INFO from "../integration-type-info/microsoftSQLServerInfo";
andres-torres-marroquin marked this conversation as resolved.
Show resolved Hide resolved

export type IntegrationTypeInfo = {
placeholder: ConnectionConfigurationResponse;
category: ConnectionCategory;
Expand All @@ -29,6 +31,7 @@ const INTEGRATION_TYPE_MAP: { [K in ConnectionType]?: IntegrationTypeInfo } = {
[ConnectionType.GOOGLE_CLOUD_SQL_MYSQL]: GOOGLE_CLOUD_SQL_MYSQL_TYPE_INFO,
[ConnectionType.GOOGLE_CLOUD_SQL_POSTGRES]:
GOOGLE_CLOUD_SQL_POSTGRES_TYPE_INFO,
[ConnectionType.MSSQL]: MICROSOFT_SQL_SERVER_TYPE_INFO,
[ConnectionType.RDS_MYSQL]: RDS_MYSQL_TYPE_INFO,
[ConnectionType.RDS_POSTGRES]: RDS_POSTGRES_TYPE_INFO,
[ConnectionType.S3]: S3_TYPE_INFO,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export const GOOGLE_CLOUD_SQL_MYSQL_TAGS = [
"Detection",
"Discovery",
"DSR automation",
"GCP",
"MySQL",
];

export const GoogleCloudSQLMySQLOverview = () => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export const GOOGLE_CLOUD_SQL_POSTGRES_TAGS = [
"Detection",
"Discovery",
"DSR automation",
"GCP",
"Postgres",
];

export const GoogleCloudSQLPostgresOverview = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import { ListItem } from "fidesui";

import {
InfoHeading,
InfoText,
InfoUnorderedList,
} from "~/features/common/copy/components";
import ShowMoreContent from "~/features/common/copy/ShowMoreContent";
import { ConnectionCategory } from "~/features/integrations/ConnectionCategory";
import { AccessLevel, ConnectionType } from "~/types/api";

export const MICROSOFT_SQL_SERVER_PLACEHOLDER = {
name: "Microsoft SQL Server",
key: "microsoft_sql_server_placeholder",
connection_type: ConnectionType.MSSQL,
access: AccessLevel.READ,
created_at: "",
};

export const MICROSOFT_SQL_SERVER_TAGS = [
"Database",
"Detection",
"Discovery",
"Microsoft SQL Server",
];

export const MicrosoftSQLServerOverview = () => (
<>
<InfoHeading text="Overview" />
<InfoText>
Microsoft SQL Server, is a relational database management system (RDBMS)
developed by Microsoft. It is designed to store, manage, and retrieve data
as requested by other software applications, which may run either on the
same computer or across a network.
</InfoText>
<ShowMoreContent>
<InfoHeading text="Categories" />
<InfoUnorderedList>
<ListItem>Database</ListItem>
<ListItem>SQL database</ListItem>
<ListItem>Storage system</ListItem>
<ListItem>Data detection</ListItem>
<ListItem>Data discovery</ListItem>
</InfoUnorderedList>
<InfoHeading text="Permissions" />
<InfoText>
For detecting databases, Fides requires a user with the following
permissions/role:
</InfoText>
<InfoUnorderedList>
<ListItem>
CREATE LOGIN username WITH PASSWORD = &apos;password&apos;;
</ListItem>
<ListItem>GRANT SELECT, INSERT, UPDATE TO username;</ListItem>
</InfoUnorderedList>
</ShowMoreContent>
</>
);

const MICROSOFT_SQL_SERVER_TYPE_INFO = {
placeholder: MICROSOFT_SQL_SERVER_PLACEHOLDER,
category: ConnectionCategory.DATABASE,
overview: <MicrosoftSQLServerOverview />,
tags: MICROSOFT_SQL_SERVER_TAGS,
};

export default MICROSOFT_SQL_SERVER_TYPE_INFO;
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export const RDS_MYSQL_TAGS = [
"Database",
"Detection",
"Discovery",
"DSR automation",
"RDS",
"MySQL",
andres-torres-marroquin marked this conversation as resolved.
Show resolved Hide resolved
];

export const RDSMySQLOverview = () => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export const RDS_POSTGRES_TAGS = [
"Database",
"Detection",
"Discovery",
"DSR automation",
"RDS",
"Postgres",
andres-torres-marroquin marked this conversation as resolved.
Show resolved Hide resolved
];

export const RDSPostgresOverview = () => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const SCYLLA_TAGS = [
"Detection",
"Discovery",
"DSR automation",
"ScyllaDB",
andres-torres-marroquin marked this conversation as resolved.
Show resolved Hide resolved
];

export const ScyllaOverview = () => (
Expand Down
3 changes: 3 additions & 0 deletions clients/admin-ui/src/types/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ export { GenerateTypes } from "./models/GenerateTypes";
export type { GetRegistrationStatusResponse } from "./models/GetRegistrationStatusResponse";
export type { GoogleCloudSQLMySQLDocsSchema } from "./models/GoogleCloudSQLMySQLDocsSchema";
export type { GoogleCloudSQLPostgresDocsSchema } from "./models/GoogleCloudSQLPostgresDocsSchema";
// export type { RDSPostgresDocsSchema } from "./models/GoogleCloudSQLPostgresDocsSchema";
andres-torres-marroquin marked this conversation as resolved.
Show resolved Hide resolved
// export type { RDSMySQLDocsSchema } from "./models/GoogleCloudSQLPostgresDocsSchema";
// export type { MicrosoftSQLServerDocsSchema } from "./models/GoogleCloudSQLPostgresDocsSchema";
export type { GPPApplicationConfig } from "./models/GPPApplicationConfig";
export type { GPPApplicationConfigResponse } from "./models/GPPApplicationConfigResponse";
export type { GPPFieldMapping } from "./models/GPPFieldMapping";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import ClassVar, List
from typing import ClassVar, List, Optional

from pydantic import Field

Expand Down Expand Up @@ -34,16 +34,16 @@ class MicrosoftSQLServerSchema(ConnectionConfigSecretsSchema):
description="The password used to authenticate and access the database.",
json_schema_extra={"sensitive": True},
)
dbname: str = Field(
description="The name of the specific database within the database server that you want to connect to.",
dbname: Optional[str] = Field(
default=None,
andres-torres-marroquin marked this conversation as resolved.
Show resolved Hide resolved
title="Database",
description="The name of the specific database within the database server that you want to connect to.",
)

_required_components: ClassVar[List[str]] = [
"host",
"username",
"password",
"dbname",
]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ def test_get_connection_secret_schema_mssql(
"type": "string",
},
},
"required": ["host", "username", "password", "dbname"],
"required": ["host", "username", "password"],
andres-torres-marroquin marked this conversation as resolved.
Show resolved Hide resolved
}

def test_get_connection_secret_schema_mysql(
Expand Down
Loading