GoogleCloudPlatform / go-endpoints

Cloud Endpoints for Go
https://go-endpoints.appspot.com
Apache License 2.0
255 stars 56 forks source link

Memcache for cert #62

Closed ghost closed 9 years ago

ghost commented 9 years ago

https://github.com/GoogleCloudPlatform/go-endpoints/blob/master/endpoints/auth.go#L191 namespacedContext, err := appengine.Namespace(c, certNamespace) // The certNamespace is static "__verify_jwt"

https://github.com/GoogleCloudPlatform/go-endpoints/blob/master/endpoints/auth.go#L198 _, err = memcache.JSON.Get(namespacedContext, DefaultCertURI, &certs) The DefaultCertURI is static "https://www.googleapis.com/service_accounts/v1/metadata/raw/federated-signon@system.gserviceaccount.com"

Different user will save and get their cert in the same memcache.

Please let me know if I am wrong. Thanks in advance.

x1ddos commented 9 years ago

What do you mean? I think you are wrong.

dhermes commented 9 years ago

That CERT is for checking all the ID tokens, which have their 3rd part (the signature in a JWT) signed by it.

ghost commented 9 years ago

Hi Danny,

Thank you for your clarification. Sorry my bad, CERT == certificate.

2015-03-01 2:59 GMT+08:00 Danny Hermes notifications@github.com:

That CERT is for checking all the ID tokens, which have their 3rd part (the signature in a JWT) signed by it.

— Reply to this email directly or view it on GitHub https://github.com/GoogleCloudPlatform/go-endpoints/issues/62#issuecomment-76540096 .