Browse Source

feat: allow self-signed certificate for Minio (#9213)

* feat: support selfsigned certificate for minio

* fix: remove unwanted check
pull/9225/head
Anbarasu 4 months ago committed by GitHub
parent
commit
f342d657b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      packages/nocodb/src/plugins/mino/Minio.ts
  2. 8
      packages/nocodb/src/plugins/mino/index.ts

7
packages/nocodb/src/plugins/mino/Minio.ts

@ -12,6 +12,7 @@ interface MinioObjectStorageInput {
useSSL?: boolean; useSSL?: boolean;
endPoint: string; endPoint: string;
port: number; port: number;
ca?: string;
} }
export default class Minio implements IStorageAdapterV2 { export default class Minio implements IStorageAdapterV2 {
@ -32,6 +33,12 @@ export default class Minio implements IStorageAdapterV2 {
}; };
this.minioClient = new MinioClient(minioOptions); this.minioClient = new MinioClient(minioOptions);
if (this.input.useSSL && this.input.ca) {
this.minioClient.setRequestOptions({
ca: this.input.ca,
});
}
} }
public async test(): Promise<boolean> { public async test(): Promise<boolean> {

8
packages/nocodb/src/plugins/mino/index.ts

@ -5,7 +5,7 @@ import type { XcPluginConfig } from 'nc-plugin';
const config: XcPluginConfig = { const config: XcPluginConfig = {
builder: S3Plugin, builder: S3Plugin,
title: 'Minio', title: 'Minio',
version: '0.0.1', version: '0.0.3',
logo: 'plugins/minio.png', logo: 'plugins/minio.png',
description: description:
'MinIO is a High Performance Object Storage released under Apache License v2.0. It is API compatible with Amazon S3 cloud storage service.', 'MinIO is a High Performance Object Storage released under Apache License v2.0. It is API compatible with Amazon S3 cloud storage service.',
@ -50,6 +50,12 @@ const config: XcPluginConfig = {
type: XcType.Password, type: XcType.Password,
required: true, required: true,
}, },
{
key: 'ca',
label: 'Ca',
placeholder: 'Ca',
type: XcType.LongText,
},
{ {
key: 'useSSL', key: 'useSSL',
label: 'Use SSL', label: 'Use SSL',

Loading…
Cancel
Save