Important: We recommend that you use the Google ID JWT because this allows all of your service accounts to access the Google ID token server that you have configured in your OpenAPI configuration file. If instead you use a custom JWT signed only by the service account, you must explicitly list each service account that you wish to grant access to in thesecurityDefinitionssection of your OpenAPI configuration file. This means that you'll have to redeploy the configuration whenever you want to grant access to a new service account.
--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/ab312b5e-9608-46ec-98bc-51d72aa17358%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender by reply email and then delete this message and any attachments.
Thanks for answering so quickly, your response did clear things up, thanks a lot!
What I didn’t get before was that the role of the OpenAPI document was so different in the two contexts, and that I couldn’t expect the ESP OpenAPI document to work the same way in Frameworks.
Concerning the implementation of the auth for Endpoints Frameworks, what you’re saying is that there’s no way around listing explicitly each service account in the Annotations ? That redeploying the API each time is mandatory ?
Just out of curiosity, what if I was to accept all service accounts (simply by not listing any issuers), and then perform a regex check on the User email in my code ? Would that be enough to confirm that the issuer is from my project since the project ID is attached to the service account email and since each project ID is unique ?
In that scenario there wouldn’t be any need to redeploy the app as long as all the service accounts are from the same project. But apart from the fact that it’s a terribly ugly workaround, would that be enough to secure the API ? Would there be anyway for a malicious third party to manipulate a random Google ID token and trick Google’s Service Control API into thinking it’s from a service account from another project ?
Thanks again,
Quentin
Obtenez Outlook pour iOS
From: Andrew Gunsch <gun...@google.com>
Sent: Friday, August 10, 2018 8:36:58 PM
To: Quentin Cavalié
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endpoints+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/ab312b5e-9608-46ec-98bc-51d72aa17358%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Regards,
James Krimm
Inline:
On Friday, August 10, 2018 at 12:51:45 PM UTC-7, Quentin Cavalié wrote:Thanks for answering so quickly, your response did clear things up, thanks a lot!
What I didn’t get before was that the role of the OpenAPI document was so different in the two contexts, and that I couldn’t expect the ESP OpenAPI document to work the same way in Frameworks.
Concerning the implementation of the auth for Endpoints Frameworks, what you’re saying is that there’s no way around listing explicitly each service account in the Annotations ? That redeploying the API each time is mandatory ?Correct. Just a limitation of using the Frameworks rather than an ESP-based setup.
Just out of curiosity, what if I was to accept all service accounts (simply by not listing any issuers), and then perform a regex check on the User email in my code ? Would that be enough to confirm that the issuer is from my project since the project ID is attached to the service account email and since each project ID is unique ?Interesting idea! I think that the framework will still validate the JWT, and then pass back the information in the User token, but I can't say for sure today whether that's true nor whether that's safe enough to fully secure the API. I'll see if we can get more information next week.Obviously it would also depend on the correctness of your email validation and assumptions about what service account patterns you're accepting.
In that scenario there wouldn’t be any need to redeploy the app as long as all the service accounts are from the same project. But apart from the fact that it’s a terribly ugly workaround, would that be enough to secure the API ? Would there be anyway for a malicious third party to manipulate a random Google ID token and trick Google’s Service Control API into thinking it’s from a service account from another project ?
Thanks again,
Quentin
Obtenez Outlook pour iOS
From: Andrew Gunsch <gun...@google.com>
Sent: Friday, August 10, 2018 8:36:58 PM
To: Quentin Cavalié
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/ab312b5e-9608-46ec-98bc-51d72aa17358%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender by reply email and then delete this message and any attachments.
--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/b9412e65-8fdb-4e2f-b264-9e088210e5cc%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/CANMRvhnyyGE9e4QZiM6x30B6H9GjsKbTOyjviwi2G2gg0y5AAA%40mail.gmail.com.
Python: endpoints.get_current_user().email()
is verified by Google and can not be faked?Java: user.getEmail()
Regards,
James Krimm
Office: (317) 759-4943 | Cell: (859) 339-9493 | E-mail: jkr...@appirio.com
Cloud Powered Business Blog: blog.appirio.com | twitter: twitter.com/appirio
Accelerating Enterprise Adoption of the Cloud
Hi Daniel,
The authenticators don't currently support arbitrary issuers
2018-08-14 13:27:43.609 CESTcom.google.api.server.spi.auth.EspAuthenticator authenticate: Authentication failed: com.google.common.util.concurrent.UncheckedExecutionException: com.google.api.auth.UnauthenticatedException: Failed to verify the signature of the auth token (EspAuthenticator.java:86)
@Api(name = "my-api",
version = "v1",
title = "My API",
authenticators = {EspAuthenticator.class},
namespace = @ApiNamespace(ownerDomain = "my-api.com",
ownerName = "my-api.com"),
audiences = "https://my-project-id.appspot.com")
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "my-project-id.appspot.com"
},
"host": "my-project-id.appspot.com",
"basePath": "/",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/my-api/v1/my-method": {
...
"security": [
{
"google_id_token": [ ]
},
{
"google_id_token_https": [ ]
}
],
"x-security": [
{
"google_id_token": {
"audiences": [
"https://my-project-id.appspot.com"
]
}
},
{
"google_id_token_https": {
"audiences": [
"https://my-project-id.appspot.com"
]
}
}
]
}
}
},
"securityDefinitions": {
"google_id_token_https": {
"type": "oauth2",
"authorizationUrl": "",
"flow": "implicit",
"x-google-issuer": "https://accounts.google.com",
"x-google-jwks_uri": "https://www.googleapis.com/oauth2/v1/certs"
},
"google_id_token": {
"type": "oauth2",
"authorizationUrl": "",
"flow": "implicit",
"x-google-issuer": "accounts.google.com",
"x-google-jwks_uri": "https://www.googleapis.com/oauth2/v1/certs"
}
},
"definitions": {
...
}
}
--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/2b15d0f9-c1a8-4b62-94df-534368976cb0%40googlegroups.com.