google cloud platform - OAuth2 "Invalid JWT Signature." error after a month for non-expired key - Stack Overfl

There is an app that acts like an API, deployed in Google Cloud Run as a Service. It was set up to requ

There is an app that acts like an API, deployed in Google Cloud Run as a Service. It was set up to require authentication:

Another app calls this API using Google service account key for authentication. Keys are created "without" expiration date (kinda):

Nevertheless, regularly, approximately after a month of usage, those who use the key start getting this error:

java.io.IOException: Error getting id token for service account: 400 Bad Request
POST 
{"error":"invalid_grant","error_description":"Invalid JWT Signature."}, iss: <SERVICE_ACCOUNT_NAME_HERE>

New key "solves" the problem. For a month. Any ideas why this might be happening?

There is an app that acts like an API, deployed in Google Cloud Run as a Service. It was set up to require authentication:

Another app calls this API using Google service account key for authentication. Keys are created "without" expiration date (kinda):

Nevertheless, regularly, approximately after a month of usage, those who use the key start getting this error:

java.io.IOException: Error getting id token for service account: 400 Bad Request
POST https://oauth2.googleapis/token
{"error":"invalid_grant","error_description":"Invalid JWT Signature."}, iss: <SERVICE_ACCOUNT_NAME_HERE>

New key "solves" the problem. For a month. Any ideas why this might be happening?

Share asked Mar 7 at 17:18 AvorthorenAvorthoren 111 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

By default, service account keys never expire. You can use an anization policy constraint to specify the length of time for which a service account key is valid.

Since (your) every service account expires every month resulting in an error "Invalid JWT Signature", I think there’s an anization policy in place that enforces the constraints/iam.serviceAccountKeyExpiryHours constraint.

You or your admin must have the Organization Policy Administrator role to disable the constraint.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744916017a4600839.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信