# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: authentication/v1alpha1/policy.proto

import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)

_sym_db = _symbol_database.Default()




DESCRIPTOR = _descriptor.FileDescriptor(
  name='authentication/v1alpha1/policy.proto',
  package='istio.authentication.v1alpha1',
  syntax='proto3',
  serialized_pb=_b('\n$authentication/v1alpha1/policy.proto\x12\x1distio.authentication.v1alpha1\"\x93\x01\n\tMutualTls\x12\x11\n\tallow_tls\x18\x01 \x01(\x08\x12;\n\x04mode\x18\x02 \x01(\x0e\x32-.istio.authentication.v1alpha1.MutualTls.Mode\"6\n\x04Mode\x12\n\n\x06STRICT\x10\x00\x12\x12\n\x0eTLS_PERMISSIVE\x10\x01\x12\x0e\n\nPERMISSIVE\x10\x02\"c\n\x03Jwt\x12\x0e\n\x06issuer\x18\x01 \x01(\t\x12\x11\n\taudiences\x18\x02 \x03(\t\x12\x10\n\x08jwks_uri\x18\x03 \x01(\t\x12\x13\n\x0bjwt_headers\x18\x06 \x03(\t\x12\x12\n\njwt_params\x18\x07 \x03(\t\"\x91\x01\n\x18PeerAuthenticationMethod\x12\x38\n\x04mtls\x18\x01 \x01(\x0b\x32(.istio.authentication.v1alpha1.MutualTlsH\x00\x12\x31\n\x03jwt\x18\x02 \x01(\x0b\x32\".istio.authentication.v1alpha1.JwtH\x00\x42\x08\n\x06params\"M\n\x1aOriginAuthenticationMethod\x12/\n\x03jwt\x18\x01 \x01(\x0b\x32\".istio.authentication.v1alpha1.Jwt\"\xde\x02\n\x06Policy\x12>\n\x07targets\x18\x01 \x03(\x0b\x32-.istio.authentication.v1alpha1.TargetSelector\x12\x46\n\x05peers\x18\x02 \x03(\x0b\x32\x37.istio.authentication.v1alpha1.PeerAuthenticationMethod\x12\x18\n\x10peer_is_optional\x18\x03 \x01(\x08\x12J\n\x07origins\x18\x04 \x03(\x0b\x32\x39.istio.authentication.v1alpha1.OriginAuthenticationMethod\x12\x1a\n\x12origin_is_optional\x18\x05 \x01(\x08\x12J\n\x11principal_binding\x18\x06 \x01(\x0e\x32/.istio.authentication.v1alpha1.PrincipalBinding\"j\n\x0eTargetSelector\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06subset\x18\x02 \x01(\t\x12:\n\x05ports\x18\x03 \x03(\x0b\x32+.istio.authentication.v1alpha1.PortSelector\"8\n\x0cPortSelector\x12\x10\n\x06number\x18\x01 \x01(\rH\x00\x12\x0e\n\x04name\x18\x02 \x01(\tH\x00\x42\x06\n\x04port*0\n\x10PrincipalBinding\x12\x0c\n\x08USE_PEER\x10\x00\x12\x0e\n\nUSE_ORIGIN\x10\x01\x42&Z$istio.io/api/authentication/v1alpha1b\x06proto3')
)

_PRINCIPALBINDING = _descriptor.EnumDescriptor(
  name='PrincipalBinding',
  full_name='istio.authentication.v1alpha1.PrincipalBinding',
  filename=None,
  file=DESCRIPTOR,
  values=[
    _descriptor.EnumValueDescriptor(
      name='USE_PEER', index=0, number=0,
      options=None,
      type=None),
    _descriptor.EnumValueDescriptor(
      name='USE_ORIGIN', index=1, number=1,
      options=None,
      type=None),
  ],
  containing_type=None,
  options=None,
  serialized_start=1068,
  serialized_end=1116,
)
_sym_db.RegisterEnumDescriptor(_PRINCIPALBINDING)

PrincipalBinding = enum_type_wrapper.EnumTypeWrapper(_PRINCIPALBINDING)
USE_PEER = 0
USE_ORIGIN = 1


_MUTUALTLS_MODE = _descriptor.EnumDescriptor(
  name='Mode',
  full_name='istio.authentication.v1alpha1.MutualTls.Mode',
  filename=None,
  file=DESCRIPTOR,
  values=[
    _descriptor.EnumValueDescriptor(
      name='STRICT', index=0, number=0,
      options=None,
      type=None),
    _descriptor.EnumValueDescriptor(
      name='TLS_PERMISSIVE', index=1, number=1,
      options=None,
      type=None),
    _descriptor.EnumValueDescriptor(
      name='PERMISSIVE', index=2, number=2,
      options=None,
      type=None),
  ],
  containing_type=None,
  options=None,
  serialized_start=165,
  serialized_end=219,
)
_sym_db.RegisterEnumDescriptor(_MUTUALTLS_MODE)


_MUTUALTLS = _descriptor.Descriptor(
  name='MutualTls',
  full_name='istio.authentication.v1alpha1.MutualTls',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    _descriptor.FieldDescriptor(
      name='allow_tls', full_name='istio.authentication.v1alpha1.MutualTls.allow_tls', index=0,
      number=1, type=8, cpp_type=7, label=1,
      has_default_value=False, default_value=False,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
    _descriptor.FieldDescriptor(
      name='mode', full_name='istio.authentication.v1alpha1.MutualTls.mode', index=1,
      number=2, type=14, cpp_type=8, label=1,
      has_default_value=False, default_value=0,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
    _MUTUALTLS_MODE,
  ],
  options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=72,
  serialized_end=219,
)


_JWT = _descriptor.Descriptor(
  name='Jwt',
  full_name='istio.authentication.v1alpha1.Jwt',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    _descriptor.FieldDescriptor(
      name='issuer', full_name='istio.authentication.v1alpha1.Jwt.issuer', index=0,
      number=1, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=_b("").decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
    _descriptor.FieldDescriptor(
      name='audiences', full_name='istio.authentication.v1alpha1.Jwt.audiences', index=1,
      number=2, type=9, cpp_type=9, label=3,
      has_default_value=False, default_value=[],
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
    _descriptor.FieldDescriptor(
      name='jwks_uri', full_name='istio.authentication.v1alpha1.Jwt.jwks_uri', index=2,
      number=3, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=_b("").decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
    _descriptor.FieldDescriptor(
      name='jwt_headers', full_name='istio.authentication.v1alpha1.Jwt.jwt_headers', index=3,
      number=6, type=9, cpp_type=9, label=3,
      has_default_value=False, default_value=[],
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
    _descriptor.FieldDescriptor(
      name='jwt_params', full_name='istio.authentication.v1alpha1.Jwt.jwt_params', index=4,
      number=7, type=9, cpp_type=9, label=3,
      has_default_value=False, default_value=[],
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=221,
  serialized_end=320,
)


_PEERAUTHENTICATIONMETHOD = _descriptor.Descriptor(
  name='PeerAuthenticationMethod',
  full_name='istio.authentication.v1alpha1.PeerAuthenticationMethod',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    _descriptor.FieldDescriptor(
      name='mtls', full_name='istio.authentication.v1alpha1.PeerAuthenticationMethod.mtls', index=0,
      number=1, type=11, cpp_type=10, label=1,
      has_default_value=False, default_value=None,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
    _descriptor.FieldDescriptor(
      name='jwt', full_name='istio.authentication.v1alpha1.PeerAuthenticationMethod.jwt', index=1,
      number=2, type=11, cpp_type=10, label=1,
      has_default_value=False, default_value=None,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
    _descriptor.OneofDescriptor(
      name='params', full_name='istio.authentication.v1alpha1.PeerAuthenticationMethod.params',
      index=0, containing_type=None, fields=[]),
  ],
  serialized_start=323,
  serialized_end=468,
)


_ORIGINAUTHENTICATIONMETHOD = _descriptor.Descriptor(
  name='OriginAuthenticationMethod',
  full_name='istio.authentication.v1alpha1.OriginAuthenticationMethod',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    _descriptor.FieldDescriptor(
      name='jwt', full_name='istio.authentication.v1alpha1.OriginAuthenticationMethod.jwt', index=0,
      number=1, type=11, cpp_type=10, label=1,
      has_default_value=False, default_value=None,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=470,
  serialized_end=547,
)


_POLICY = _descriptor.Descriptor(
  name='Policy',
  full_name='istio.authentication.v1alpha1.Policy',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    _descriptor.FieldDescriptor(
      name='targets', full_name='istio.authentication.v1alpha1.Policy.targets', index=0,
      number=1, type=11, cpp_type=10, label=3,
      has_default_value=False, default_value=[],
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
    _descriptor.FieldDescriptor(
      name='peers', full_name='istio.authentication.v1alpha1.Policy.peers', index=1,
      number=2, type=11, cpp_type=10, label=3,
      has_default_value=False, default_value=[],
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
    _descriptor.FieldDescriptor(
      name='peer_is_optional', full_name='istio.authentication.v1alpha1.Policy.peer_is_optional', index=2,
      number=3, type=8, cpp_type=7, label=1,
      has_default_value=False, default_value=False,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
    _descriptor.FieldDescriptor(
      name='origins', full_name='istio.authentication.v1alpha1.Policy.origins', index=3,
      number=4, type=11, cpp_type=10, label=3,
      has_default_value=False, default_value=[],
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
    _descriptor.FieldDescriptor(
      name='origin_is_optional', full_name='istio.authentication.v1alpha1.Policy.origin_is_optional', index=4,
      number=5, type=8, cpp_type=7, label=1,
      has_default_value=False, default_value=False,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
    _descriptor.FieldDescriptor(
      name='principal_binding', full_name='istio.authentication.v1alpha1.Policy.principal_binding', index=5,
      number=6, type=14, cpp_type=8, label=1,
      has_default_value=False, default_value=0,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=550,
  serialized_end=900,
)


_TARGETSELECTOR = _descriptor.Descriptor(
  name='TargetSelector',
  full_name='istio.authentication.v1alpha1.TargetSelector',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    _descriptor.FieldDescriptor(
      name='name', full_name='istio.authentication.v1alpha1.TargetSelector.name', index=0,
      number=1, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=_b("").decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
    _descriptor.FieldDescriptor(
      name='subset', full_name='istio.authentication.v1alpha1.TargetSelector.subset', index=1,
      number=2, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=_b("").decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
    _descriptor.FieldDescriptor(
      name='ports', full_name='istio.authentication.v1alpha1.TargetSelector.ports', index=2,
      number=3, type=11, cpp_type=10, label=3,
      has_default_value=False, default_value=[],
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=902,
  serialized_end=1008,
)


_PORTSELECTOR = _descriptor.Descriptor(
  name='PortSelector',
  full_name='istio.authentication.v1alpha1.PortSelector',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    _descriptor.FieldDescriptor(
      name='number', full_name='istio.authentication.v1alpha1.PortSelector.number', index=0,
      number=1, type=13, cpp_type=3, label=1,
      has_default_value=False, default_value=0,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
    _descriptor.FieldDescriptor(
      name='name', full_name='istio.authentication.v1alpha1.PortSelector.name', index=1,
      number=2, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=_b("").decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None, file=DESCRIPTOR),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
    _descriptor.OneofDescriptor(
      name='port', full_name='istio.authentication.v1alpha1.PortSelector.port',
      index=0, containing_type=None, fields=[]),
  ],
  serialized_start=1010,
  serialized_end=1066,
)

_MUTUALTLS.fields_by_name['mode'].enum_type = _MUTUALTLS_MODE
_MUTUALTLS_MODE.containing_type = _MUTUALTLS
_PEERAUTHENTICATIONMETHOD.fields_by_name['mtls'].message_type = _MUTUALTLS
_PEERAUTHENTICATIONMETHOD.fields_by_name['jwt'].message_type = _JWT
_PEERAUTHENTICATIONMETHOD.oneofs_by_name['params'].fields.append(
  _PEERAUTHENTICATIONMETHOD.fields_by_name['mtls'])
_PEERAUTHENTICATIONMETHOD.fields_by_name['mtls'].containing_oneof = _PEERAUTHENTICATIONMETHOD.oneofs_by_name['params']
_PEERAUTHENTICATIONMETHOD.oneofs_by_name['params'].fields.append(
  _PEERAUTHENTICATIONMETHOD.fields_by_name['jwt'])
_PEERAUTHENTICATIONMETHOD.fields_by_name['jwt'].containing_oneof = _PEERAUTHENTICATIONMETHOD.oneofs_by_name['params']
_ORIGINAUTHENTICATIONMETHOD.fields_by_name['jwt'].message_type = _JWT
_POLICY.fields_by_name['targets'].message_type = _TARGETSELECTOR
_POLICY.fields_by_name['peers'].message_type = _PEERAUTHENTICATIONMETHOD
_POLICY.fields_by_name['origins'].message_type = _ORIGINAUTHENTICATIONMETHOD
_POLICY.fields_by_name['principal_binding'].enum_type = _PRINCIPALBINDING
_TARGETSELECTOR.fields_by_name['ports'].message_type = _PORTSELECTOR
_PORTSELECTOR.oneofs_by_name['port'].fields.append(
  _PORTSELECTOR.fields_by_name['number'])
_PORTSELECTOR.fields_by_name['number'].containing_oneof = _PORTSELECTOR.oneofs_by_name['port']
_PORTSELECTOR.oneofs_by_name['port'].fields.append(
  _PORTSELECTOR.fields_by_name['name'])
_PORTSELECTOR.fields_by_name['name'].containing_oneof = _PORTSELECTOR.oneofs_by_name['port']
DESCRIPTOR.message_types_by_name['MutualTls'] = _MUTUALTLS
DESCRIPTOR.message_types_by_name['Jwt'] = _JWT
DESCRIPTOR.message_types_by_name['PeerAuthenticationMethod'] = _PEERAUTHENTICATIONMETHOD
DESCRIPTOR.message_types_by_name['OriginAuthenticationMethod'] = _ORIGINAUTHENTICATIONMETHOD
DESCRIPTOR.message_types_by_name['Policy'] = _POLICY
DESCRIPTOR.message_types_by_name['TargetSelector'] = _TARGETSELECTOR
DESCRIPTOR.message_types_by_name['PortSelector'] = _PORTSELECTOR
DESCRIPTOR.enum_types_by_name['PrincipalBinding'] = _PRINCIPALBINDING
_sym_db.RegisterFileDescriptor(DESCRIPTOR)

MutualTls = _reflection.GeneratedProtocolMessageType('MutualTls', (_message.Message,), dict(
  DESCRIPTOR = _MUTUALTLS,
  __module__ = 'authentication.v1alpha1.policy_pb2'
  # @@protoc_insertion_point(class_scope:istio.authentication.v1alpha1.MutualTls)
  ))
_sym_db.RegisterMessage(MutualTls)

Jwt = _reflection.GeneratedProtocolMessageType('Jwt', (_message.Message,), dict(
  DESCRIPTOR = _JWT,
  __module__ = 'authentication.v1alpha1.policy_pb2'
  # @@protoc_insertion_point(class_scope:istio.authentication.v1alpha1.Jwt)
  ))
_sym_db.RegisterMessage(Jwt)

PeerAuthenticationMethod = _reflection.GeneratedProtocolMessageType('PeerAuthenticationMethod', (_message.Message,), dict(
  DESCRIPTOR = _PEERAUTHENTICATIONMETHOD,
  __module__ = 'authentication.v1alpha1.policy_pb2'
  # @@protoc_insertion_point(class_scope:istio.authentication.v1alpha1.PeerAuthenticationMethod)
  ))
_sym_db.RegisterMessage(PeerAuthenticationMethod)

OriginAuthenticationMethod = _reflection.GeneratedProtocolMessageType('OriginAuthenticationMethod', (_message.Message,), dict(
  DESCRIPTOR = _ORIGINAUTHENTICATIONMETHOD,
  __module__ = 'authentication.v1alpha1.policy_pb2'
  # @@protoc_insertion_point(class_scope:istio.authentication.v1alpha1.OriginAuthenticationMethod)
  ))
_sym_db.RegisterMessage(OriginAuthenticationMethod)

Policy = _reflection.GeneratedProtocolMessageType('Policy', (_message.Message,), dict(
  DESCRIPTOR = _POLICY,
  __module__ = 'authentication.v1alpha1.policy_pb2'
  # @@protoc_insertion_point(class_scope:istio.authentication.v1alpha1.Policy)
  ))
_sym_db.RegisterMessage(Policy)

TargetSelector = _reflection.GeneratedProtocolMessageType('TargetSelector', (_message.Message,), dict(
  DESCRIPTOR = _TARGETSELECTOR,
  __module__ = 'authentication.v1alpha1.policy_pb2'
  # @@protoc_insertion_point(class_scope:istio.authentication.v1alpha1.TargetSelector)
  ))
_sym_db.RegisterMessage(TargetSelector)

PortSelector = _reflection.GeneratedProtocolMessageType('PortSelector', (_message.Message,), dict(
  DESCRIPTOR = _PORTSELECTOR,
  __module__ = 'authentication.v1alpha1.policy_pb2'
  # @@protoc_insertion_point(class_scope:istio.authentication.v1alpha1.PortSelector)
  ))
_sym_db.RegisterMessage(PortSelector)


DESCRIPTOR.has_options = True
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z$istio.io/api/authentication/v1alpha1'))
# @@protoc_insertion_point(module_scope)
