Skip to content

Commit

Permalink
fix: add workspace_id to secret manager when Domain admin register da…
Browse files Browse the repository at this point in the history
…tasource
  • Loading branch information
ImMin5 committed Jan 5, 2024
1 parent 595b183 commit 6eb9b55
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/spaceone/cost_analysis/conf/global_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@
# "event": []
}

# Log Settings
LOG = {
"filters": {
"masking": {
"rules": {
"DataSource.register": ["secret_data"],
}
}
}
}

CONNECTORS = {
"SpaceConnector": {
"backend": "spaceone.core.connector.space_connector:SpaceConnector",
Expand Down
2 changes: 2 additions & 0 deletions src/spaceone/cost_analysis/manager/secret_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def create_secret(
secret_data: dict,
resource_group: str,
schema_id: str,
workspace_id: str,
):
def _rollback(secret_id: str):
_LOGGER.info(f"[create_secret._rollback] Delete secret : {secret_id}")
Expand All @@ -31,6 +32,7 @@ def _rollback(secret_id: str):
"resource_group": resource_group,
"data": secret_data,
"schema_id": schema_id,
"workspace_id": workspace_id,
}

response = self.secret_connector.dispatch("Secret.create", params)
Expand Down
1 change: 1 addition & 0 deletions src/spaceone/cost_analysis/service/data_source_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def register(self, params):
secret_data,
resource_group,
plugin_info.get("schema_id"),
params["workspace_id"],
)

params["plugin_info"]["secret_id"] = secret_id
Expand Down

0 comments on commit 6eb9b55

Please sign in to comment.