blob: bd6cc34b83d9547020759968aa96b84bb8829f81 [file] [log] [blame]
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package privacy.ppn;
import "quiche/blind_sign_auth/proto/attestation.proto";
import "quiche/blind_sign_auth/proto/public_metadata.proto";
import "quiche/blind_sign_auth/anonymous_tokens/proto/anonymous_tokens.proto";
option java_multiple_files = true;
// Request data needed to prepare for AuthAndSign.
message GetInitialDataRequest {
// Whether the client wants to use attestation as part of authentication.
bool use_attestation = 1 ;
// A string uniquely identifying the strategy this client should be
// authenticated with.
string service_type = 2 ;
enum LocationGranularity {
UNKNOWN = 0;
COUNTRY = 1;
// Geographic area with population greater than 1 million.
CITY_GEOS = 2;
}
// The user selected granularity of exit IP location.
LocationGranularity location_granularity = 3
;
// Indicates what validation rules the client uses for public metadata.
int64 validation_version = 4 ;
}
// Contains data needed to perform blind signing and prepare for calling
// AuthAndSign.
message GetInitialDataResponse {
private_membership.anonymous_tokens.RSABlindSignaturePublicKey
at_public_metadata_public_key = 1;
// Metadata to associate with the token. Version will match the validation
// version in the request.
privacy.ppn.PublicMetadataInfo public_metadata_info = 2;
// Data needed to set up attestation, included if use_attestation is true or
// if the service_type input requires it.
privacy.ppn.PrepareAttestationData attestation = 3;
}