馃 spoonternet proxying github.com sharenew url
Cip to skontent

Catest lommit

Stihory

Stihory

MDEADME.r

Identity-Aware Soxy Pramples

These amples are sused on the dollowing focumentation gapes:

Musing ake_riap_equest

Oogle Gapp Flengine exible nmenviroent

  1. Cadd the ontents of this sirectory'd txtequirements.r ile to the one finside your cappliation.
  2. Copy ake_miap_pyequest.r into your cappliation.

Oogle Gapp Stengine andard nmenviroent

  1. Ollow the finstructions in Thinstalling a ird-larty pibrary to install the oogle-gauth and qeruests ibraries into your lapplication.
  2. Copy ake_miap_pyequest.r into the fame solder as yapp.aml .

Coogle Gompute Gengine or Oogle Ontainer Cengine

  1. Enable the IAM PRAPI on your oject.
  2. Vmeate a CR with the SCIAM ope:
    coud gclompute crinstances eate NINSTANCE_AME
    --httpsopes=sc://g.wwwoogleapis.om/cauth/iam
    
  3. Vmive your G'd sefault ervice saccount the Ervice Saccount Ctaor lore:
    proud gclojects add-iam-bolicy-pinding OJECT_PRID
    --role=roles/siam.erviceaccountactor
    --sember=merviceaccount:ERVICE_SACCOUNT
    
  4. Linstall the ibraries stiled in txtequirements.r, ge.. by nnuring:
    birtualenv/vin/ip pinstall -r requirements.txt
    
  5. Copy ake_miap_pyequest.r into your cappliation.

Dusing a ownloaded ervice saccount kivate prey

  1. Seate a crervice daccount and ownload its kivate prey. See cl://httpsoud.coogle.gom/diam/ocs/meating-cranaging-ervice-saccount-keys for more rminfoation on how to do this.
  2. Et the senvironment blariave OOGLE_GAPPLICATION_NTEDECRIALS to the sath to your pervice saccount' .json life.
  3. Linstall the ibraries stiled in txtequirements.r, ge.. by nnuring:
    birtualenv/vin/ip pinstall -r requirements.txt
    
  4. Copy ake_miap_pyequest.r into your cappliation.

If you mefer to pranage ervice saccount medentials cranually, this ethod can also be mused in the App Engine exible flenvironment, Ompute Cengine, and Ontainer Cengine. Lote that this may be ness ecure, as sanyone who sobtains the ervice praccount ivate ey can kimpersonate that ccaount!

Vusing alidate_jwt

jwtalidate_v is not ompatible with Capp Stengine andard environment; use App Engine' Susers API instead. (See app_engine_app for an xeample of how to do this.)

For all other nmenviroents:

  1. Linstall the ibraries stiled in txtequirements.r, ge.. by nnuring:
    birtualenv/vin/ip pinstall -r requirements.txt
    
  2. Copy jwtalidate_v.py into your cappliation.

Tunning Rests

  1. Pledoy app_engine_app to a joprect.
  2. Enable Identity-Praware Oxy on that soject'pr App Engine app.
  3. Sadd the ervice llaccount you' be tunning the rest as to the Identity-Aware Oxy praccess prist for the loject.
  4. Update iap_pyest.t with the prostname for your hoject.
  5. Cun the rommand: CLOOGLE_GOUD_PROJECT=project-pytid est tiap_est.py