Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: add iam guard to actuator (#10110)

boojack350e8d32f6a5
diff --git a/backend/api/v1/actuator_service.go b/backend/api/v1/actuator_service.go
index 9a85c302a8..821cc1eea0 100644
--- a/backend/api/v1/actuator_service.go
+++ b/backend/api/v1/actuator_service.go
@@ -113,6 +113,7 @@ func (s *ActuatorService) getServerInfo(ctx context.Context) (*v1pb.ActuatorInfo
Debug: slog.Default().Enabled(ctx, slog.LevelDebug),
Lsp: s.profile.Lsp,
PreUpdateBackup: s.profile.PreUpdateBackup,
+ IamGuard: s.profile.DevelopmentIAM,
}
return &serverInfo, nil
diff --git a/frontend/src/components/ProvideDashboardContext.vue b/frontend/src/components/ProvideDashboardContext.vue
index 5378ba30e2..e77b9028f7 100644
--- a/frontend/src/components/ProvideDashboardContext.vue
+++ b/frontend/src/components/ProvideDashboardContext.vue
@@ -15,7 +15,6 @@ import {
useUserStore,
useUIStateStore,
useDatabaseV1Store,
- useDBGroupStore,
} from "@/store";
import { projectNamePrefix } from "@/store/modules/v1/common";
@@ -48,11 +47,7 @@ onMounted(async () => {
usePolicyV1Store().getOrFetchPolicyByName("policies/WORKSPACE_IAM"),
]);
- await Promise.all([
- prepareDatabases(),
- useDBGroupStore().fetchAllDatabaseGroupList(),
- useUIStateStore().restoreState(),
- ]);
+ await Promise.all([prepareDatabases(), useUIStateStore().restoreState()]);
isLoading.value = false;
});
diff --git a/frontend/src/types/proto/v1/actuator_service.ts b/frontend/src/types/proto/v1/actuator_service.ts
index 3742231ba1..1be3cb464e 100644
--- a/frontend/src/types/proto/v1/actuator_service.ts
+++ b/frontend/src/types/proto/v1/actuator_service.ts
@@ -99,6 +99,8 @@ export interface ActuatorInfo {
lsp: boolean;
/** lsp is the enablement of data backup prior to data update. */
preUpdateBackup: boolean;
+ /** iam_guard is the enablement of IAM checks. */
+ iamGuard: boolean;
}
function createBaseGetActuatorInfoRequest(): GetActuatorInfoRequest {
@@ -549,6 +551,7 @@ function createBaseActuatorInfo(): ActuatorInfo {
debug: false,
lsp: false,
preUpdateBackup: false,
+ iamGuard: false,
};
}
@@ -605,6 +608,9 @@ export const ActuatorInfo = {
if (message.preUpdateBackup === true) {
writer.uint32(136).bool(message.preUpdateBackup);
}
+ if (message.iamGuard === true) {
+ writer.uint32(144).bool(message.iamGuard);
+ }
return writer;
},
@@ -734,6 +740,13 @@ export const ActuatorInfo = {
message.preUpdateBackup = reader.bool();
continue;
+ case 18:
+ if (tag !== 144) {
+ break;
+ }
+
+ message.iamGuard = reader.bool();
+ continue;
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -762,6 +775,7 @@ export const ActuatorInfo = {
debug: isSet(object.debug) ? globalThis.Boolean(object.debug) : false,
lsp: isSet(object.lsp) ? globalThis.Boolean(object.lsp) : false,
preUpdateBackup: isSet(object.preUpdateBackup) ? globalThis.Boolean(object.preUpdateBackup) : false,
+ iamGuard: isSet(object.iamGuard) ? globalThis.Boolean(object.iamGuard) : false,
};
},
@@ -818,6 +832,9 @@ export const ActuatorInfo = {
if (message.preUpdateBackup === true) {
obj.preUpdateBackup = message.preUpdateBackup;
}
+ if (message.iamGuard === true) {
+ obj.iamGuard = message.iamGuard;
+ }
return obj;
},
@@ -843,6 +860,7 @@ export const ActuatorInfo = {
message.debug = object.debug ?? false;
message.lsp = object.lsp ?? false;
message.preUpdateBackup = object.preUpdateBackup ?? false;
+ message.iamGuard = object.iamGuard ?? false;
return message;
},
};
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 0a3c143987..5d31838dcd 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -660,6 +660,7 @@ Actuator concept is similar to the Spring Boot Actuator.
| debug | [bool](#bool) | | debug flag means if the debug mode is enabled. |
| lsp | [bool](#bool) | | lsp is the enablement of lsp in SQL Editor. |
| pre_update_backup | [bool](#bool) | | lsp is the enablement of data backup prior to data update. |
+| iam_guard | [bool](#bool) | | iam_guard is the enablement of IAM checks. |
diff --git a/proto/generated-go/v1/actuator_service.pb.go b/proto/generated-go/v1/actuator_service.pb.go
index de320ab279..5b36b8d06d 100644
--- a/proto/generated-go/v1/actuator_service.pb.go
+++ b/proto/generated-go/v1/actuator_service.pb.go
@@ -399,6 +399,8 @@ type ActuatorInfo struct {
Lsp bool `protobuf:"varint,16,opt,name=lsp,proto3" json:"lsp,omitempty"`
// lsp is the enablement of data backup prior to data update.
PreUpdateBackup bool `protobuf:"varint,17,opt,name=pre_update_backup,json=preUpdateBackup,proto3" json:"pre_update_backup,omitempty"`
+ // iam_guard is the enablement of IAM checks.
+ IamGuard bool `protobuf:"varint,18,opt,name=iam_guard,json=iamGuard,proto3" json:"iam_guard,omitempty"`
}
func (x *ActuatorInfo) Reset() {
@@ -552,6 +554,13 @@ func (x *ActuatorInfo) GetPreUpdateBackup() bool {
return false
}
+func (x *ActuatorInfo) GetIamGuard() bool {
+ if x != nil {
+ return x.IamGuard
+ }
+ return false
+}
+
var File_v1_actuator_service_proto protoreflect.FileDescriptor
var file_v1_actuator_service_proto_rawDesc = []byte{
@@ -605,7 +614,7 @@ var file_v1_actuator_service_proto_rawDesc = []byte{
0x74, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0a, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x22, 0x14, 0x0a, 0x12,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x22, 0x84, 0x05, 0x0a, 0x0c, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49,
+ 0x73, 0x74, 0x22, 0xa1, 0x05, 0x0a, 0x0c, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49,
0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0a, 0x67, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
@@ -645,40 +654,42 @@ var file_v1_actuator_service_proto_rawDesc = []byte{
0x73, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x6c, 0x73, 0x70, 0x12, 0x2a, 0x0a,
0x11, 0x70, 0x72, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b,
0x75, 0x70, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x70, 0x72, 0x65, 0x55, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x32, 0xf0, 0x03, 0x0a, 0x0f, 0x41, 0x63,
- 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6f, 0x0a,
- 0x0f, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f,
- 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47,
- 0x65, 0x74, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f,
- 0x22, 0x1c, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31,
- 0x2f, 0x61, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x93,
- 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f,
- 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74,
- 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x75,
- 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x3a, 0xda, 0x41, 0x14, 0x61, 0x63, 0x74,
- 0x75, 0x61, 0x74, 0x6f, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73,
- 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x08, 0x61, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f,
- 0x72, 0x32, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x2f,
- 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x62, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61,
- 0x63, 0x68, 0x65, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
- 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1a, 0x82, 0xd3,
- 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x75, 0x61, 0x74,
- 0x6f, 0x72, 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x12, 0x72, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74,
- 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x6f, 0x67, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67,
- 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74,
- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x62,
- 0x75, 0x67, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0xda,
- 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63,
- 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x42, 0x11, 0x5a, 0x0f,
- 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62,
- 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x61, 0x6d,
+ 0x5f, 0x67, 0x75, 0x61, 0x72, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x61,
+ 0x6d, 0x47, 0x75, 0x61, 0x72, 0x64, 0x32, 0xf0, 0x03, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x75, 0x61,
+ 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6f, 0x0a, 0x0f, 0x47, 0x65,
+ 0x74, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41,
+ 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x1c, 0xda,
+ 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63,
+ 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x93, 0x01, 0x0a, 0x12,
+ 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e,
+ 0x66, 0x6f, 0x12, 0x26, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49,
+ 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f,
+ 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x3a, 0xda, 0x41, 0x14, 0x61, 0x63, 0x74, 0x75, 0x61, 0x74,
+ 0x6f, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x08, 0x61, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x32, 0x11,
+ 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x66,
+ 0x6f, 0x12, 0x62, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65,
+ 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44,
+ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x14, 0x2a, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x2f,
+ 0x63, 0x61, 0x63, 0x68, 0x65, 0x12, 0x72, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x62,
+ 0x75, 0x67, 0x4c, 0x6f, 0x67, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x6f, 0x67,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c,
+ 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0xda, 0x41, 0x00, 0x82,
+ 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x75, 0x61,
+ 0x74, 0x6f, 0x72, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e,
+ 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x33,
}
var (
diff --git a/proto/v1/actuator_service.proto b/proto/v1/actuator_service.proto
index bd37fd079c..abe3ad8c1e 100644
--- a/proto/v1/actuator_service.proto
+++ b/proto/v1/actuator_service.proto
@@ -136,4 +136,7 @@ message ActuatorInfo {
// lsp is the enablement of data backup prior to data update.
bool pre_update_backup = 17;
+
+ // iam_guard is the enablement of IAM checks.
+ bool iam_guard = 18;
}