Skip to content

ditchtech/GCPPython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

GCPPython

The file reads setup data from BigQuery table, which can be updated for feeding inputs to the script.

Row Access

BQ Codes -

DROP ALL ROW ACCESS POLICIES ON `projectid.TestData.international_debt`;

CREATE OR REPLACE ROW ACCESS POLICY Apac_Policy_Group
ON `projectid.TestData.international_debt`
GRANT TO("group:testaccessgroup@googlegroups.com") 
FILTER USING(TRUE);

CREATE OR REPLACE ROW ACCESS POLICY Apac_Policy
ON `projectid.TestData.international_debt`
GRANT TO("user:xxxxxx@gmail.com") 
FILTER USING(<Condition>);

Youtube Tutorial - uc9dvp2ld1zbajymnpr7netg

Table schema for data entry should be as follows -

Field name Type Mode

Project

STRING NULLABLE

Dataset

STRING NULLABLE

Table

STRING NULLABLE

PolicyName

STRING NULLABLE

Groups

STRING NULLABLE

Admin

STRING NULLABLE

Users

STRING NULLABLE

AccessCondition

STRING NULLABLE

Note, admin functionality has not been implemented and can be left out blank.

 

Multiple user/group entry in table should be of format :user1@gmail.com,user2@gmail.com

Access permissions should be of format identical to where clause :country_name in ('Sri Lanka','Vietnam','China','Hong Kong','Indonesia','India')

JWTTest

Program runs a simple test to request access scope to cloud resources to validate SA key.

Note you should have requesting access to project.

<keyfile> - SA key json file downloaded when Service account key was generated.

<project> - Project to which cloud access is requested

Note:- You may need to install google-auth libraries

Connect with me:

anthonygomescal raptorx raptorx uc9dvp2ld1zbajymnpr7netg

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages