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

Added TrustServerCertificate param in connectionInfo #746

Merged
merged 6 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,13 @@ Please note that our [Code of Conduct](./CODE_OF_CONDUCT.md) applies to all Wren
<sub><b>AryanK1511</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Spirizeon">
<img src="https://avatars.githubusercontent.com/u/123345456?v=4" width="100;" alt="Spirizeon"/>
<br />
<sub><b>Ayush Dutta</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/kpman">
<img src="https://avatars.githubusercontent.com/u/2382594?v=4" width="100;" alt="kpman"/>
Expand All @@ -259,15 +266,15 @@ Please note that our [Code of Conduct](./CODE_OF_CONDUCT.md) applies to all Wren
<sub><b>grieve54706</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/hpatel292-seneca">
<img src="https://avatars.githubusercontent.com/u/100322816?v=4" width="100;" alt="hpatel292-seneca"/>
<br />
<sub><b>Harshil Patel</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/RoacherM">
<img src="https://avatars.githubusercontent.com/u/33534878?v=4" width="100;" alt="RoacherM"/>
Expand Down Expand Up @@ -303,15 +310,15 @@ Please note that our [Code of Conduct](./CODE_OF_CONDUCT.md) applies to all Wren
<sub><b>Saai Syvendra</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/sahil9001">
<img src="https://avatars.githubusercontent.com/u/32628578?v=4" width="100;" alt="sahil9001"/>
<br />
<sub><b>sahil9001</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/yb-sid">
<img src="https://avatars.githubusercontent.com/u/129207298?v=4" width="100;" alt="yb-sid"/>
Expand Down
13 changes: 11 additions & 2 deletions wren-ui/src/apollo/server/dataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,18 @@ const dataSource = {
DataSourceName.MSSQL,
connectionInfo,
);
const { host, port, database, user, password } =
const { host, port, database, user, password, trustServerCertificate } =
decryptedConnectionInfo as MS_SQL_CONNECTION_INFO;
return { host, port, database, user, password };
return {
host,
port,
database,
user,
password,
kwargs: {
TrustServerCertificate: trustServerCertificate,
},
himanshu634 marked this conversation as resolved.
Show resolved Hide resolved
};
},
} as IDataSourceConnectionInfo<
MS_SQL_CONNECTION_INFO,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export interface MS_SQL_CONNECTION_INFO {
user: string;
password: string;
database: string;
trustServerCertificate: boolean;
}

export interface CLICK_HOUSE_CONNECTION_INFO {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Form, Input } from 'antd';
import { Form, Input, Switch } from 'antd';
import { ERROR_TEXTS } from '@/utils/error';
import { FORM_MODE } from '@/utils/enum';

Expand Down Expand Up @@ -88,6 +88,13 @@ export default function SQLServerProperties(props: Props) {
>
<Input placeholder="SQL Server database name" disabled={isEditMode} />
</Form.Item>
<Form.Item
label="Enable Trust Server Certificate"
name="trustServerCertificate"
valuePropName="checked"
>
<Switch />
</Form.Item>
himanshu634 marked this conversation as resolved.
Show resolved Hide resolved
</>
);
}