@@ -1311,19 +1311,21 @@ def models_in_uc(df):
13111311
13121312check_id = '105' #GOV-34,Governance,Monitor audit logs with system tables
13131313enabled , sbp_rec = getSecurityBestPracticeRecord (check_id , cloud_type )
1314- metastores = {} # hold all the metastores that have no 'access' schema with state ENABLE_COMPLETED
1314+ metastores = {} # hold all the metastores that have no 'access' schema enabled ( ENABLE_COMPLETED or MANAGED)
13151315def uc_systemschemas (df ):
13161316 if df is not None and not isEmpty (df ):
1317- return (check_id , 0 , {'enable_serverless_compute' :'access schema with state ENABLE_COMPLETED found' } )
1317+ return (check_id , 0 , {'enable_serverless_compute' :'access schema enabled ( ENABLE_COMPLETED or MANAGED) found' } )
13181318 else :
1319- return (check_id , 1 , {'enable_serverless_compute' :'access schema with state ENABLE_COMPLETED not found ' })
1319+ return (check_id , 1 , {'enable_serverless_compute' :'access schema not enabled ( state not ENABLE_COMPLETED or MANAGED) ' })
13201320
13211321if enabled :
13221322 tbl_name = 'systemschemas' + '_' + workspace_id
1323+ # API returns "schema" and "state". Access schema can be ENABLE_COMPLETED or MANAGED (default-enabled).
13231324 sql = f'''
13241325 SELECT *
13251326 FROM { tbl_name }
1326- where schema ="access" and state ="ENABLE_COMPLETED"
1327+ WHERE schema = "access"
1328+ AND (state = "ENABLE_COMPLETED" OR state = "MANAGED")
13271329 '''
13281330 sqlctrl (workspace_id , sql , uc_systemschemas )
13291331
0 commit comments