| 1 |
# Copyright 2025 Google LLC |
| 2 |
# |
| 3 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
# you may not use this file except in compliance with the License. |
| 5 |
# You may obtain a copy of the License at |
| 6 |
# |
| 7 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
# |
| 9 |
# Unless required by applicable law or agreed to in writing, software |
| 10 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
# See the License for the specific language governing permissions and |
| 13 |
# limitations under the License. |
| 14 |
|
| 15 |
from typing import ClassVar as _ClassVar |
| 16 |
from typing import Iterable as _Iterable |
| 17 |
from typing import Mapping as _Mapping |
| 18 |
from typing import Optional as _Optional |
| 19 |
from typing import Union as _Union |
| 20 |
|
| 21 |
from google.protobuf import descriptor as _descriptor |
| 22 |
from google.protobuf import message as _message |
| 23 |
from google.protobuf.internal import containers as _containers |
| 24 |
|
| 25 |
DESCRIPTOR: _descriptor.FileDescriptor |
| 26 |
|
| 27 |
class Authentication(_message.Message): |
| 28 |
__slots__ = ("rules", "providers") |
| 29 |
RULES_FIELD_NUMBER: _ClassVar[int] |
| 30 |
PROVIDERS_FIELD_NUMBER: _ClassVar[int] |
| 31 |
rules: _containers.RepeatedCompositeFieldContainer[AuthenticationRule] |
| 32 |
providers: _containers.RepeatedCompositeFieldContainer[AuthProvider] |
| 33 |
def __init__( |
| 34 |
self, |
| 35 |
rules: _Optional[_Iterable[_Union[AuthenticationRule, _Mapping]]] = ..., |
| 36 |
providers: _Optional[_Iterable[_Union[AuthProvider, _Mapping]]] = ..., |
| 37 |
) -> None: ... |
| 38 |
|
| 39 |
class AuthenticationRule(_message.Message): |
| 40 |
__slots__ = ("selector", "oauth", "allow_without_credential", "requirements") |
| 41 |
SELECTOR_FIELD_NUMBER: _ClassVar[int] |
| 42 |
OAUTH_FIELD_NUMBER: _ClassVar[int] |
| 43 |
ALLOW_WITHOUT_CREDENTIAL_FIELD_NUMBER: _ClassVar[int] |
| 44 |
REQUIREMENTS_FIELD_NUMBER: _ClassVar[int] |
| 45 |
selector: str |
| 46 |
oauth: OAuthRequirements |
| 47 |
allow_without_credential: bool |
| 48 |
requirements: _containers.RepeatedCompositeFieldContainer[AuthRequirement] |
| 49 |
def __init__( |
| 50 |
self, |
| 51 |
selector: _Optional[str] = ..., |
| 52 |
oauth: _Optional[_Union[OAuthRequirements, _Mapping]] = ..., |
| 53 |
allow_without_credential: bool = ..., |
| 54 |
requirements: _Optional[_Iterable[_Union[AuthRequirement, _Mapping]]] = ..., |
| 55 |
) -> None: ... |
| 56 |
|
| 57 |
class JwtLocation(_message.Message): |
| 58 |
__slots__ = ("header", "query", "cookie", "value_prefix") |
| 59 |
HEADER_FIELD_NUMBER: _ClassVar[int] |
| 60 |
QUERY_FIELD_NUMBER: _ClassVar[int] |
| 61 |
COOKIE_FIELD_NUMBER: _ClassVar[int] |
| 62 |
VALUE_PREFIX_FIELD_NUMBER: _ClassVar[int] |
| 63 |
header: str |
| 64 |
query: str |
| 65 |
cookie: str |
| 66 |
value_prefix: str |
| 67 |
def __init__( |
| 68 |
self, |
| 69 |
header: _Optional[str] = ..., |
| 70 |
query: _Optional[str] = ..., |
| 71 |
cookie: _Optional[str] = ..., |
| 72 |
value_prefix: _Optional[str] = ..., |
| 73 |
) -> None: ... |
| 74 |
|
| 75 |
class AuthProvider(_message.Message): |
| 76 |
__slots__ = ( |
| 77 |
"id", |
| 78 |
"issuer", |
| 79 |
"jwks_uri", |
| 80 |
"audiences", |
| 81 |
"authorization_url", |
| 82 |
"jwt_locations", |
| 83 |
) |
| 84 |
ID_FIELD_NUMBER: _ClassVar[int] |
| 85 |
ISSUER_FIELD_NUMBER: _ClassVar[int] |
| 86 |
JWKS_URI_FIELD_NUMBER: _ClassVar[int] |
| 87 |
AUDIENCES_FIELD_NUMBER: _ClassVar[int] |
| 88 |
AUTHORIZATION_URL_FIELD_NUMBER: _ClassVar[int] |
| 89 |
JWT_LOCATIONS_FIELD_NUMBER: _ClassVar[int] |
| 90 |
id: str |
| 91 |
issuer: str |
| 92 |
jwks_uri: str |
| 93 |
audiences: str |
| 94 |
authorization_url: str |
| 95 |
jwt_locations: _containers.RepeatedCompositeFieldContainer[JwtLocation] |
| 96 |
def __init__( |
| 97 |
self, |
| 98 |
id: _Optional[str] = ..., |
| 99 |
issuer: _Optional[str] = ..., |
| 100 |
jwks_uri: _Optional[str] = ..., |
| 101 |
audiences: _Optional[str] = ..., |
| 102 |
authorization_url: _Optional[str] = ..., |
| 103 |
jwt_locations: _Optional[_Iterable[_Union[JwtLocation, _Mapping]]] = ..., |
| 104 |
) -> None: ... |
| 105 |
|
| 106 |
class OAuthRequirements(_message.Message): |
| 107 |
__slots__ = ("canonical_scopes",) |
| 108 |
CANONICAL_SCOPES_FIELD_NUMBER: _ClassVar[int] |
| 109 |
canonical_scopes: str |
| 110 |
def __init__(self, canonical_scopes: _Optional[str] = ...) -> None: ... |
| 111 |
|
| 112 |
class AuthRequirement(_message.Message): |
| 113 |
__slots__ = ("provider_id", "audiences") |
| 114 |
PROVIDER_ID_FIELD_NUMBER: _ClassVar[int] |
| 115 |
AUDIENCES_FIELD_NUMBER: _ClassVar[int] |
| 116 |
provider_id: str |
| 117 |
audiences: str |
| 118 |
def __init__( |
| 119 |
self, provider_id: _Optional[str] = ..., audiences: _Optional[str] = ... |
| 120 |
) -> None: ... |