github.com/cockroachdb/cockroachdb-parser@v0.23.3-0.20240213214944-911057d40c9a/pkg/sql/sessiondatapb/session_revival_token.proto (about)

     1  // Copyright 2022 The Cockroach Authors.
     2  //
     3  // Use of this software is governed by the Business Source License
     4  // included in the file licenses/BSL.txt.
     5  //
     6  // As of the Change Date specified in that file, in accordance with
     7  // the Business Source License, use of this software will be governed
     8  // by the Apache License, Version 2.0, included in the file
     9  // licenses/APL.txt.
    10  
    11  syntax = "proto3";
    12  package cockroach.sql.sessiondatapb;
    13  option go_package = "github.com/cockroachdb/cockroach/pkg/sql/sessiondatapb";
    14  
    15  import "google/protobuf/timestamp.proto";
    16  
    17  // SessionRevivalToken is an opaque piece of data that can be used to
    18  // authenticate a new SQL session for the user who created this token.
    19  message SessionRevivalToken {
    20    // Payload is defined as a separate type so that it’s easier to sign.
    21    message Payload {
    22      // The SQL user who can use this token to authenticate.
    23      string user = 1;
    24      // The algorithm used to sign the payload. Can be either Ed25519 or RSA.
    25      string algorithm = 2;
    26      // The time that this token is no longer considered valid.
    27      google.protobuf.Timestamp expires_at = 3;
    28      // The time that this token was created.
    29      google.protobuf.Timestamp issued_at = 4;
    30    }
    31  
    32    // The payload to sign. This uses raw bytes so the data being signed is
    33    // deterministic and not dependent on the proto version.
    34    bytes payload = 1;
    35    // The signature of the payload, signed using the new signing key.
    36    bytes signature = 2;
    37  }