You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ This is a code to deploy sharedflows which are used when your backend is secured
7
7
## Prerequisite
8
8
9
9
- A GCP Project with, for example, an App Engine.
10
-
- A service Account with good rights to call your App Engine and it's JSON Key.
10
+
- A service Account with good rights to call your App Engine and his JSON Key.
11
11
- An Apigee account with an organization (free or paid).
12
12
-[Maven](https://github.com/apigee/apigee-deploy-maven-plugin) or [apigeetools](https://github.com/apigee/apigeetool-node) install on your computer to deploy the sharedflow.
Copy file name to clipboardExpand all lines: sharedflows/gcp-token-iap/README.md
+28-28Lines changed: 28 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,21 +2,21 @@
2
2
3
3
## Description
4
4
5
-
Ce sharedflow va permettre de demander un jeton OAuth à Google en fonction du service account qui lui ai passé en paramètre.
6
-
Une fois le token récupéré alors on le met en cache durant la durée définit dans le fichier de configuration _caches.json_ (peut être différent pour chaque environnement. Dans nos exemples cette valeur est de 10 seconde en dev, 60 secondes en test et 3500 secondes en prd).
5
+
This sharedflow will make it possible to request an OAuth token from Google according to the service account that was passed to it as a parameter.
6
+
Once the token has been retrieved, then it is cached for the duration defined in the configuration file _caches.json_ (may be different for each environment. In our examples this value is 10 seconds in dev, 60 seconds in test and 3500 seconds in prd).
Lors de l'utilisation de ce sharedflow dans un proxy il faut d'abord prévoir :
11
11
12
-
-Un sevice account qui a les droit d'appeler une API sur GCP via un IAP.
13
-
-Le JSON de ce service account.
14
-
-Créer une entrée dans le KVM chiffré *gcp-service-account-credentials*avec en clé le nom du projet et en valeur le contenu du JSON du service account.
15
-
-Créer dans le proxy une variable nommée*private.credentialsjson*dont la valeur est le contenu du JSON du service account.
12
+
-A service account that has the rights to call an API on GCP via IAP
13
+
-The JSON of this service account
14
+
-Create an entry in the encrypted KVM *gcp-service-account-credentials*with the project name as key and the service account JSON content as value
15
+
-Create in the proxy a variable named*private.credentialsjson*whose value is the content of the JSON of the service account
Cette policy vérifie si une valeur existe dans un cache dont le nom est composé :
31
-
-nom de l'organisation
32
-
-nom de l'environnement
33
-
-nom du proxy
34
-
-numéro de la révision
35
-
-nom de la target
36
-
Si une valeur est trouvée alors on instancie la valeur de la variable _google-credentials.id-token_avec cette valeur.
37
-
Cela permet d'éviter de demander un nouveau token si cette valeur est toujours présente (durée de cache encore valide).
30
+
This policy checks if a value exists in a cache whose name is composed :
31
+
-Organization name
32
+
-Environment name
33
+
-Proxy name
34
+
-Revision number
35
+
-Target name
36
+
If a value is found then we instantiate the value of the _google-credentials.access-token_variable with this value.
37
+
This avoids asking for a new token if this value is still present (cache duration still valid).
38
38
39
-
**Les 4 étapes suivantes ne sont exécutées que si la variable _google-credentials.id-token_n'est pas vide.**
39
+
**The next 4 steps are only executed if the _google-credentials.access-token_variable is not empty. **
40
40
41
41
### js.extract-credentials
42
42
43
-
Cette policy permet d'extraire chaque paire clé/valeur de la variable*private.credentialsjson*(qui contient le contenu du JSON du service account).
43
+
This policy extracts each key/value pair from the*private.credentialsjson*variable (which contains the JSON content of the service account).
44
44
45
45
### gjwt.generate-JWT
46
46
47
-
Cette policy utilise les informations récupérées pour générer un jeton JWT. Ce jeton est inscrit dans la variable *output_jwt*.
47
+
This policy uses the retrieved information to generate a JWT token. This token is written in the variable *output_jwt*.
48
48
49
49
### sc.gcp-oauth
50
50
51
-
Cette policy demande à GCP la création d'un jeton OAuth à partir du jeton JWT généré précédemment. Ce jeton est inscrit dans la variable *callout-token*.
51
+
This policy asks GCP to create an OAuth token from the previously generated JWT token. This token is written in the variable *callout-token*.
52
52
53
53
### ev.extract-json
54
54
55
-
Cette policy extrait le jeton OAuth renvoyé précédemment et crée une variable *google-credentials.id-token*.
55
+
This policy extracts the OAuth token returned earlier and creates a variable *google-credentials.access-token*.
56
56
57
57
### am.add-authorization
58
58
59
-
Cette policy crée une en-tête *Authorization*dont la valeur est*Bearer * + le contenu de la variable _google-credentials.id-token_.
59
+
This policy creates an *Authorization*header whose value is*Bearer * + the content of the _google-credentials.access-token_ variable.
60
60
61
61
### pc.gcp-token
62
62
63
-
Cette policy met en cache la valeur de la variable _google-credentials.id-token_dans un cache dont le nom est composé :
64
-
-nom de l'organisation
65
-
-nom de l'environnement
66
-
-nom du proxy
67
-
-numéro de la révision
68
-
-nom de la target
63
+
This policy caches the value of the _google-credentials.access-token_variable in a cache whose name is composed :
Copy file name to clipboardExpand all lines: sharedflows/gcp-token-oauth/README.md
+30-30Lines changed: 30 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,21 +2,21 @@
2
2
3
3
## Description
4
4
5
-
Ce sharedflow va permettre de demander un jeton OAuth à Google en fonction du service account qui lui ai passé en paramètre.
6
-
Une fois le token récupéré alors on le met en cache durant la durée définit dans le fichier de configuration _caches.json_ (peut être différent pour chaque environnement. Dans nos exemples cette valeur est de 10 seconde en dev, 60 secondes en test et 3500 secondes en prd).
5
+
This sharedflow will make it possible to request an OAuth token from Google according to the service account that was passed to it as a parameter.
6
+
Once the token has been retrieved, then it is cached for the duration defined in the configuration file _caches.json_ (may be different for each environment. In our examples this value is 10 seconds in dev, 60 seconds in test and 3500 seconds in prd).
Cette policy vérifie si une valeur existe dans un cache dont le nom est composé :
31
-
-nom de l'organisation
32
-
-nom de l'environnement
33
-
-nom du proxy
34
-
-numéro de la révision
35
-
-nom de la target
36
-
Si une valeur est trouvée alors on instancie la valeur de la variable _google-credentials.access-token_avec cette valeur.
37
-
Cela permet d'éviter de demander un nouveau token si cette valeur est toujours présente (durée de cache encore valide).
30
+
This policy checks if a value exists in a cache whose name is composed :
31
+
-Organization name
32
+
-Environment name
33
+
-Proxy name
34
+
-Revision number
35
+
-Target name
36
+
If a value is found then we instantiate the value of the _google-credentials.access-token_variable with this value.
37
+
This avoids asking for a new token if this value is still present (cache duration still valid).
38
38
39
-
**Les 4 étapes suivantes ne sont exécutées que si la variable _google-credentials.access-token_n'est pas vide.**
39
+
**The next 4 steps are only executed if the _google-credentials.access-token_variable is not empty. **
40
40
41
41
### js.extract-credentials
42
42
43
-
Cette policy permet d'extraire chaque paire clé/valeur de la variable*private.credentialsjson*(qui contient le contenu du JSON du service account).
43
+
This policy extracts each key/value pair from the*private.credentialsjson*variable (which contains the JSON content of the service account).
44
44
45
45
### gjwt.generate-JWT
46
46
47
-
Cette policy utilise les informations récupérées pour générer un jeton JWT. Ce jeton est inscrit dans la variable *output_jwt*.
47
+
This policy uses the retrieved information to generate a JWT token. This token is written in the variable *output_jwt*.
48
48
49
49
### sc.gcp-oauth
50
50
51
-
Cette policy demande à GCP la création d'un jeton OAuth à partir du jeton JWT généré précédemment. Ce jeton est inscrit dans la variable *callout-token*.
51
+
This policy asks GCP to create an OAuth token from the previously generated JWT token. This token is written in the variable *callout-token*.
52
52
53
53
### ev.extract-json
54
54
55
-
Cette policy extrait le jeton OAuth renvoyé précédemment et crée une variable *google-credentials.access-token*.
55
+
This policy extracts the OAuth token returned earlier and creates a variable *google-credentials.access-token*.
56
56
57
57
### am.add-authorization
58
58
59
-
Cette policy crée une en-tête *Authorization*dont la valeur est*Bearer * + le contenu de la variable _google-credentials.access-token_.
59
+
This policy creates an *Authorization*header whose value is*Bearer * + the content of the _google-credentials.access-token_ variable.
60
60
61
61
### pc.gcp-token
62
62
63
-
Cette policy met en cache la valeur de la variable _google-credentials.access-token_dans un cache dont le nom est composé :
64
-
-nom de l'organisation
65
-
-nom de l'environnement
66
-
-nom du proxy
67
-
-numéro de la révision
68
-
-nom de la target
63
+
This policy caches the value of the _google-credentials.access-token_variable in a cache whose name is composed :
0 commit comments