feat:レビュー指摘事項修正
https://nds-tyo.backlog.com/git/NEWDWH2021/newsdwh2021/pullRequests/37#comment-1247549 https://nds-tyo.backlog.com/git/NEWDWH2021/newsdwh2021/pullRequests/37#comment-1247558
This commit is contained in:
parent
bb77ae9368
commit
bd515960d9
@ -5,3 +5,4 @@ from dataclasses import dataclass
|
|||||||
class NoSecurityOptionView:
|
class NoSecurityOptionView:
|
||||||
schema_name: str
|
schema_name: str
|
||||||
table_name: str
|
table_name: str
|
||||||
|
security_type: str
|
||||||
|
|||||||
@ -44,6 +44,7 @@ def handler(event, context):
|
|||||||
# ④ Viewのオプションを確認するため、データを取得する
|
# ④ Viewのオプションを確認するため、データを取得する
|
||||||
logger.info('I-04-01', 'Viewセキュリティオプション チェック開始')
|
logger.info('I-04-01', 'Viewセキュリティオプション チェック開始')
|
||||||
check_result = fetch_view_security_options(connection, check_target_schemas)
|
check_result = fetch_view_security_options(connection, check_target_schemas)
|
||||||
|
logger.debug('D-04-01', f'取得データ:{check_result}')
|
||||||
if len(check_result) == 0:
|
if len(check_result) == 0:
|
||||||
logger.info('I-04-02', 'Viewセキュリティオプション 未設定のViewはありません。処理を終了します。')
|
logger.info('I-04-02', 'Viewセキュリティオプション 未設定のViewはありません。処理を終了します。')
|
||||||
return
|
return
|
||||||
@ -164,7 +165,8 @@ def fetch_view_security_options(connection: Database, check_target_schemas: list
|
|||||||
select_view_security_option_sql = f"""
|
select_view_security_option_sql = f"""
|
||||||
SELECT
|
SELECT
|
||||||
TABLE_SCHEMA,
|
TABLE_SCHEMA,
|
||||||
TABLE_NAME
|
TABLE_NAME,
|
||||||
|
SECURITY_TYPE
|
||||||
FROM
|
FROM
|
||||||
INFORMATION_SCHEMA.VIEWS
|
INFORMATION_SCHEMA.VIEWS
|
||||||
WHERE
|
WHERE
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user