Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: tokenserver/api/minter/v1/token_minter.proto

Issue 2987383002: tokenserver: Protos for service account rules. (Closed)
Patch Set: tokenserver: Protos for service account rules. Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tokenserver/api/minter/v1/pb.discovery.go ('k') | tokenserver/api/minter/v1/token_minter.pb.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 syntax = "proto3"; 5 syntax = "proto3";
6 6
7 package tokenserver.minter; 7 package tokenserver.minter;
8 8
9 import "google/protobuf/timestamp.proto"; 9 import "google/protobuf/timestamp.proto";
10 10
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 // An end user that wants to act as the service account (perhaps indirectly). 333 // An end user that wants to act as the service account (perhaps indirectly).
334 // 334 //
335 // A string of the form "user:<email>". On Swarming, this is an identity of 335 // A string of the form "user:<email>". On Swarming, this is an identity of
336 // a user that posted the task. 336 // a user that posted the task.
337 // 337 //
338 // TODO(vadimsh): Verify that this user is present during MintOAuthTokenGrant 338 // TODO(vadimsh): Verify that this user is present during MintOAuthTokenGrant
339 // RPC by requiring the end user's credentials, e.g make Swarming forward 339 // RPC by requiring the end user's credentials, e.g make Swarming forward
340 // user's OAuth token to the token server, where it can be validated. 340 // user's OAuth token to the token server, where it can be validated.
341 // 341 //
342 // Required. 342 // Required.
343 string end_user_identity = 3; 343 string end_user = 3;
344 344
345 // Optional reason why the grant is created. 345 // Optional reason why the grant is created.
346 // 346 //
347 // Used only for logging and auditing purposes. Doesn't become part of the 347 // Used only for logging and auditing purposes. Doesn't become part of the
348 // grant. 348 // grant.
349 string intent = 4; 349 string intent = 4;
350 } 350 }
351 351
352 352
353 // MintOAuthTokenGrantResponse is returned by MintOAuthTokenGrant. 353 // MintOAuthTokenGrantResponse is returned by MintOAuthTokenGrant.
(...skipping 13 matching lines...) Expand all
367 // 367 //
368 // Additional implicit field is the identity of whoever makes this call. It is 368 // Additional implicit field is the identity of whoever makes this call. It is
369 // compared against 'wielder_identity' inside the token. 369 // compared against 'wielder_identity' inside the token.
370 message MintOAuthTokenViaGrantRequest { 370 message MintOAuthTokenViaGrantRequest {
371 // A previously generated grant, as returned by MintOAuthTokenGrant. 371 // A previously generated grant, as returned by MintOAuthTokenGrant.
372 string grant_token = 1; 372 string grant_token = 1;
373 373
374 // The list of OAuth scopes the access token should have. 374 // The list of OAuth scopes the access token should have.
375 // 375 //
376 // The server may reject the request if some scopes are not allowed. 376 // The server may reject the request if some scopes are not allowed.
377 repeated string oauth_scopes = 2; 377 repeated string oauth_scope = 2;
378 378
379 // Minimally accepted validity duration of the returned OAuth token (seconds). 379 // Minimally accepted validity duration of the returned OAuth token (seconds).
380 // 380 //
381 // The server may return a token that lives longer than this. The maximum is 381 // The server may return a token that lives longer than this. The maximum is
382 // 1h. An attempt to get a token that lives longer than 1h will result in 382 // 1h. An attempt to get a token that lives longer than 1h will result in
383 // an error. 383 // an error.
384 // 384 //
385 // The returned token validity duration doesn't depend on the lifetime of 385 // The returned token validity duration doesn't depend on the lifetime of
386 // the grant: it's possible to use a grant that expires in 1 sec to get an 386 // the grant: it's possible to use a grant that expires in 1 sec to get an
387 // access token that lives for 1h. 387 // access token that lives for 1h.
388 // 388 //
389 // Default is 300 sec. 389 // Default is 300 sec.
390 int64 min_validity_duration = 3; 390 int64 min_validity_duration = 3;
391 } 391 }
392 392
393 393
394 // MintOAuthTokenViaGrantResponse is returned by MintOAuthTokenViaGrant. 394 // MintOAuthTokenViaGrantResponse is returned by MintOAuthTokenViaGrant.
395 message MintOAuthTokenViaGrantResponse { 395 message MintOAuthTokenViaGrantResponse {
396 string access_token = 1; // service account OAuth2 access token 396 string access_token = 1; // service account OAuth2 access token
397 google.protobuf.Timestamp expiry = 2; // when this token expires 397 google.protobuf.Timestamp expiry = 2; // when this token expires
398 398
399 // Identifier of the service and its version that produced the token. 399 // Identifier of the service and its version that produced the token.
400 // 400 //
401 // Has the form "<app-id>/<module-version>". Used only for logging and 401 // Has the form "<app-id>/<module-version>". Used only for logging and
402 // monitoring. 402 // monitoring.
403 string service_version = 3; 403 string service_version = 3;
404 } 404 }
OLDNEW
« no previous file with comments | « tokenserver/api/minter/v1/pb.discovery.go ('k') | tokenserver/api/minter/v1/token_minter.pb.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698