1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298
|
// Code generated by protoc-gen-go.
// source: google.golang.org/genproto/googleapis/api/serviceconfig/auth.proto
// DO NOT EDIT!
package google_api
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// `Authentication` defines the authentication configuration for an API.
//
// Example for an API targeted for external use:
//
// name: calendar.googleapis.com
// authentication:
// rules:
// - selector: "*"
// oauth:
// canonical_scopes: https://www.googleapis.com/auth/calendar
//
// - selector: google.calendar.Delegate
// oauth:
// canonical_scopes: https://www.googleapis.com/auth/calendar.read
type Authentication struct {
// A list of authentication rules that apply to individual API methods.
//
// **NOTE:** All service configuration rules follow "last one wins" order.
Rules []*AuthenticationRule `protobuf:"bytes,3,rep,name=rules" json:"rules,omitempty"`
// Defines a set of authentication providers that a service supports.
Providers []*AuthProvider `protobuf:"bytes,4,rep,name=providers" json:"providers,omitempty"`
}
func (m *Authentication) Reset() { *m = Authentication{} }
func (m *Authentication) String() string { return proto.CompactTextString(m) }
func (*Authentication) ProtoMessage() {}
func (*Authentication) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
func (m *Authentication) GetRules() []*AuthenticationRule {
if m != nil {
return m.Rules
}
return nil
}
func (m *Authentication) GetProviders() []*AuthProvider {
if m != nil {
return m.Providers
}
return nil
}
// Authentication rules for the service.
//
// By default, if a method has any authentication requirements, every request
// must include a valid credential matching one of the requirements.
// It's an error to include more than one kind of credential in a single
// request.
//
// If a method doesn't have any auth requirements, request credentials will be
// ignored.
type AuthenticationRule struct {
// Selects the methods to which this rule applies.
//
// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
Selector string `protobuf:"bytes,1,opt,name=selector" json:"selector,omitempty"`
// The requirements for OAuth credentials.
Oauth *OAuthRequirements `protobuf:"bytes,2,opt,name=oauth" json:"oauth,omitempty"`
// Whether to allow requests without a credential. The credential can be
// an OAuth token, Google cookies (first-party auth) or EndUserCreds.
//
// For requests without credentials, if the service control environment is
// specified, each incoming request **must** be associated with a service
// consumer. This can be done by passing an API key that belongs to a consumer
// project.
AllowWithoutCredential bool `protobuf:"varint,5,opt,name=allow_without_credential,json=allowWithoutCredential" json:"allow_without_credential,omitempty"`
// Requirements for additional authentication providers.
Requirements []*AuthRequirement `protobuf:"bytes,7,rep,name=requirements" json:"requirements,omitempty"`
}
func (m *AuthenticationRule) Reset() { *m = AuthenticationRule{} }
func (m *AuthenticationRule) String() string { return proto.CompactTextString(m) }
func (*AuthenticationRule) ProtoMessage() {}
func (*AuthenticationRule) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
func (m *AuthenticationRule) GetSelector() string {
if m != nil {
return m.Selector
}
return ""
}
func (m *AuthenticationRule) GetOauth() *OAuthRequirements {
if m != nil {
return m.Oauth
}
return nil
}
func (m *AuthenticationRule) GetAllowWithoutCredential() bool {
if m != nil {
return m.AllowWithoutCredential
}
return false
}
func (m *AuthenticationRule) GetRequirements() []*AuthRequirement {
if m != nil {
return m.Requirements
}
return nil
}
// Configuration for an anthentication provider, including support for
// [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
type AuthProvider struct {
// The unique identifier of the auth provider. It will be referred to by
// `AuthRequirement.provider_id`.
//
// Example: "bookstore_auth".
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
// Identifies the principal that issued the JWT. See
// https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
// Usually a URL or an email address.
//
// Example: https://securetoken.google.com
// Example: 1234567-compute@developer.gserviceaccount.com
Issuer string `protobuf:"bytes,2,opt,name=issuer" json:"issuer,omitempty"`
// URL of the provider's public key set to validate signature of the JWT. See
// [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
// Optional if the key set document:
// - can be retrieved from
// [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
// of the issuer.
// - can be inferred from the email domain of the issuer (e.g. a Google service account).
//
// Example: https://www.googleapis.com/oauth2/v1/certs
JwksUri string `protobuf:"bytes,3,opt,name=jwks_uri,json=jwksUri" json:"jwks_uri,omitempty"`
}
func (m *AuthProvider) Reset() { *m = AuthProvider{} }
func (m *AuthProvider) String() string { return proto.CompactTextString(m) }
func (*AuthProvider) ProtoMessage() {}
func (*AuthProvider) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
func (m *AuthProvider) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *AuthProvider) GetIssuer() string {
if m != nil {
return m.Issuer
}
return ""
}
func (m *AuthProvider) GetJwksUri() string {
if m != nil {
return m.JwksUri
}
return ""
}
// OAuth scopes are a way to define data and permissions on data. For example,
// there are scopes defined for "Read-only access to Google Calendar" and
// "Access to Cloud Platform". Users can consent to a scope for an application,
// giving it permission to access that data on their behalf.
//
// OAuth scope specifications should be fairly coarse grained; a user will need
// to see and understand the text description of what your scope means.
//
// In most cases: use one or at most two OAuth scopes for an entire family of
// products. If your product has multiple APIs, you should probably be sharing
// the OAuth scope across all of those APIs.
//
// When you need finer grained OAuth consent screens: talk with your product
// management about how developers will use them in practice.
//
// Please note that even though each of the canonical scopes is enough for a
// request to be accepted and passed to the backend, a request can still fail
// due to the backend requiring additional scopes or permissions.
type OAuthRequirements struct {
// The list of publicly documented OAuth scopes that are allowed access. An
// OAuth token containing any of these scopes will be accepted.
//
// Example:
//
// canonical_scopes: https://www.googleapis.com/auth/calendar,
// https://www.googleapis.com/auth/calendar.read
CanonicalScopes string `protobuf:"bytes,1,opt,name=canonical_scopes,json=canonicalScopes" json:"canonical_scopes,omitempty"`
}
func (m *OAuthRequirements) Reset() { *m = OAuthRequirements{} }
func (m *OAuthRequirements) String() string { return proto.CompactTextString(m) }
func (*OAuthRequirements) ProtoMessage() {}
func (*OAuthRequirements) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} }
func (m *OAuthRequirements) GetCanonicalScopes() string {
if m != nil {
return m.CanonicalScopes
}
return ""
}
// User-defined authentication requirements, including support for
// [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
type AuthRequirement struct {
// [id][google.api.AuthProvider.id] from authentication provider.
//
// Example:
//
// provider_id: bookstore_auth
ProviderId string `protobuf:"bytes,1,opt,name=provider_id,json=providerId" json:"provider_id,omitempty"`
// The list of JWT
// [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
// that are allowed to access. A JWT containing any of these audiences will
// be accepted. When this setting is absent, only JWTs with audience
// "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
// will be accepted. For example, if no audiences are in the setting,
// LibraryService API will only accept JWTs with the following audience
// "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
//
// Example:
//
// audiences: bookstore_android.apps.googleusercontent.com,
// bookstore_web.apps.googleusercontent.com
Audiences string `protobuf:"bytes,2,opt,name=audiences" json:"audiences,omitempty"`
}
func (m *AuthRequirement) Reset() { *m = AuthRequirement{} }
func (m *AuthRequirement) String() string { return proto.CompactTextString(m) }
func (*AuthRequirement) ProtoMessage() {}
func (*AuthRequirement) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} }
func (m *AuthRequirement) GetProviderId() string {
if m != nil {
return m.ProviderId
}
return ""
}
func (m *AuthRequirement) GetAudiences() string {
if m != nil {
return m.Audiences
}
return ""
}
func init() {
proto.RegisterType((*Authentication)(nil), "google.api.Authentication")
proto.RegisterType((*AuthenticationRule)(nil), "google.api.AuthenticationRule")
proto.RegisterType((*AuthProvider)(nil), "google.api.AuthProvider")
proto.RegisterType((*OAuthRequirements)(nil), "google.api.OAuthRequirements")
proto.RegisterType((*AuthRequirement)(nil), "google.api.AuthRequirement")
}
func init() {
proto.RegisterFile("google.golang.org/genproto/googleapis/api/serviceconfig/auth.proto", fileDescriptor1)
}
var fileDescriptor1 = []byte{
// 423 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x52, 0xcd, 0x6e, 0xd3, 0x40,
0x10, 0x96, 0xd3, 0xa6, 0x8d, 0x27, 0x55, 0x0a, 0x7b, 0xa8, 0x4c, 0xf9, 0x8b, 0x2c, 0x0e, 0xe1,
0x62, 0x4b, 0x2d, 0x42, 0x9c, 0x40, 0x0d, 0x07, 0x94, 0x13, 0xc1, 0x08, 0x71, 0xb4, 0x96, 0xf5,
0xe0, 0x2c, 0x6c, 0x77, 0xcc, 0xfe, 0x34, 0x37, 0x1e, 0x86, 0x27, 0xe3, 0x51, 0x50, 0xd6, 0x6e,
0xe2, 0xa6, 0x37, 0x8e, 0x33, 0xdf, 0xdf, 0x7e, 0x63, 0xc3, 0xbc, 0x26, 0xaa, 0x15, 0x66, 0x35,
0x29, 0xae, 0xeb, 0x8c, 0x4c, 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