diff --git a/docs/docs/protodocs/proto.md b/docs/docs/protodocs/proto.md index 4171f172ea..74c9b96d29 100644 --- a/docs/docs/protodocs/proto.md +++ b/docs/docs/protodocs/proto.md @@ -117,6 +117,7 @@ - [RuleType.Definition.Eval.Vulncheck](#mediator-v1-RuleType-Definition-Eval-Vulncheck) - [RuleType.Definition.Ingest](#mediator-v1-RuleType-Definition-Ingest) - [RuleType.Definition.Remediate](#mediator-v1-RuleType-Definition-Remediate) + - [RuleType.Definition.Remediate.GhBranchProtectionType](#mediator-v1-RuleType-Definition-Remediate-GhBranchProtectionType) - [SignatureVerification](#mediator-v1-SignatureVerification) - [StoreProviderTokenRequest](#mediator-v1-StoreProviderTokenRequest) - [StoreProviderTokenResponse](#mediator-v1-StoreProviderTokenResponse) @@ -1974,6 +1975,22 @@ Ingest defines how the data is ingested. | ----- | ---- | ----- | ----------- | | type | [string](#string) | | | | rest | [RestType](#mediator-v1-RestType) | optional | | +| gh_branch_protection | [RuleType.Definition.Remediate.GhBranchProtectionType](#mediator-v1-RuleType-Definition-Remediate-GhBranchProtectionType) | optional | | + + + + + + + + +### RuleType.Definition.Remediate.GhBranchProtectionType + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| patch | [string](#string) | | | diff --git a/examples/github/profiles/profile.yaml b/examples/github/profiles/profile.yaml index 206a80cb09..90f52fd745 100644 --- a/examples/github/profiles/profile.yaml +++ b/examples/github/profiles/profile.yaml @@ -12,18 +12,6 @@ repository: - type: secret_push_protection def: enabled: true - - type: branch_protection - params: - branch: main - def: - required_pull_request_reviews: - dismiss_stale_reviews: true - require_code_owner_reviews: true - required_approving_review_count: 1 - required_linear_history: true - allow_force_pushes: false - allow_deletions: false - allow_fork_syncing: true - type: github_actions_allowed def: allowed_actions: selected @@ -54,6 +42,70 @@ repository: def: {} - type: trivy_action_enabled def: {} + - type: branch_protection_enabled + params: + branch: main + def: {} + - type: branch_protection_allow_deletions + params: + branch: main + def: + allow_deletions: false + - type: branch_protection_allow_force_pushes + params: + branch: main + def: + allow_force_pushes: false + - type: branch_protection_enforce_admins + params: + branch: main + def: + enforce_admins: true + - type: branch_protection_lock_branch + params: + branch: main + def: + lock_branch: false + - type: branch_protection_require_conversation_resolution + params: + branch: main + def: + required_conversation_resolution: true + - type: branch_protection_require_linear_history + params: + branch: main + def: + required_linear_history: true + - type: branch_protection_require_pull_request_approving_review_count + params: + branch: main + def: + required_approving_review_count: 1 + - type: branch_protection_require_pull_request_code_owners_review + params: + branch: main + def: + require_code_owner_reviews: true + - type: branch_protection_require_pull_request_dismiss_stale_reviews + params: + branch: main + def: + dismiss_stale_reviews: true + - type: branch_protection_require_pull_request_last_push_approval + params: + branch: main + def: + require_last_push_approval: true + - type: branch_protection_require_pull_requests + params: + branch: main + def: + required_pull_request_reviews: true + - type: branch_protection_require_signatures + params: + branch: main + def: + required_signatures: false artifact: - type: artifact_signature params: diff --git a/examples/github/rule-types/branch_protection.yaml b/examples/github/rule-types/branch_protection.yaml deleted file mode 100644 index 835594d801..0000000000 --- a/examples/github/rule-types/branch_protection.yaml +++ /dev/null @@ -1,118 +0,0 @@ ---- -version: v1 -type: rule-type -name: branch_protection -context: - provider: github -description: Verifies that a branch has proper protections. -guidance: | - You can protect important branches by setting branch protection rules, which define whether - collaborators can delete or force push to the branch and set requirements for any pushes to the branch, - such as passing status checks or a linear commit history. - - For more information, see - https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule -def: - # Defines the section of the pipeline the rule will appear in. - # This will affect the template that is used to render multiple parts - # of the rule. - in_entity: repository - # Defines the schema for parameters that will be passed to the rule - param_schema: - properties: - branch: - type: string - description: "The name of the branch to check." - required: - - branch - # Defines the schema for writing a rule with this rule being checked - rule_schema: - properties: - branch_protection: - type: "object" - properties: - enforce_admins: - type: boolean - description: "Set to true to enforce required status checks for repository administrators" - required_pull_request_reviews: - type: object - properties: - dismiss_stale_reviews: - description: "Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit." - type: boolean - require_code_owner_reviews: - description: "Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit." - type: boolean - required_approving_review_count: - description: "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers." - type: integer - require_last_push_approval: - description: "Whether the most recent push must be approved by someone other than the person who pushed it." - type: boolean - default: false - required_signatures: - type: boolean - description: "Wether this branch requires signed commits" - required_linear_history: - type: boolean - description: "Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch." - allow_force_pushes: - type: boolean - description: "Permits force pushes to the protected branch by anyone with write access to the repository." - allow_deletions: - type: boolean - description: "Allows deletion of the protected branch by anyone with write access to the repository." - required_conversation_resolution: - type: boolean - description: "Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule." - lock_branch: - type: boolean - description: "Whether to set the branch as read-only. If this is true, users will not be able to push to the branch." - allow_fork_syncing: - type: boolean - description: "Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing." - # Defines the configuration for ingesting data relevant for the rule - ingest: - type: rest - rest: - # This is the path to the data source. Given that this will evaluate - # for each repository in the organization, we use a template that - # will be evaluated for each repository. The structure to use is the - # protobuf structure for the entity that is being evaluated. - endpoint: '/repos/{{.Entity.Owner}}/{{.Entity.Name}}/branches/{{ index .Params "branch" }}/protection' - # This is the method to use to retrieve the data. It should already default to JSON - parse: json - fallback: - - http_code: 404 - body: | - {"http_status": 404, "message": "Not Protected"} - # Defines the configuration for evaluating data ingested against the given profile - eval: - type: jq - jq: - # Ingested points to the data retrieved in the `ingest` section - - ingested: - def: ".required_pull_request_reviews.dismiss_stale_reviews" - # profile points to the profile itself. - profile: - def: ".required_pull_request_reviews.dismiss_stale_reviews" - - ingested: - def: ".required_pull_request_reviews.require_code_owner_reviews" - profile: - def: ".required_pull_request_reviews.require_code_owner_reviews" - - ingested: - def: ".required_pull_request_reviews.required_approving_review_count" - profile: - def: ".required_pull_request_reviews.required_approving_review_count" - - ingested: - def: ".required_linear_history.enabled" - profile: - def: ".required_linear_history" - - ingested: - def: ".allow_force_pushes.enabled" - profile: - def: ".allow_force_pushes" - - ingested: - def: ".allow_deletions.enabled" - profile: - def: ".allow_deletions" diff --git a/examples/github/rule-types/branch_protection_allow_deletions.yaml b/examples/github/rule-types/branch_protection_allow_deletions.yaml new file mode 100644 index 0000000000..4697f6f4d1 --- /dev/null +++ b/examples/github/rule-types/branch_protection_allow_deletions.yaml @@ -0,0 +1,61 @@ +--- +version: v1 +type: rule-type +name: branch_protection_allow_deletions +context: + provider: github +description: Whether the branch can be deleted +guidance: | + ## Allow users with push access to delete matching branches. + + For more information, see + https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule +def: + # Defines the section of the pipeline the rule will appear in. + # This will affect the template that is used to render multiple parts + # of the rule. + in_entity: repository + # Defines the schema for parameters that will be passed to the rule + param_schema: + properties: + branch: + type: string + description: "The name of the branch to check." + required: + - branch + # Defines the schema for writing a rule with this rule being checked + rule_schema: + properties: + allow_deletions: + type: boolean + description: "Allows deletion of the protected branch by anyone with write access to the repository." + default: false + # Defines the configuration for ingesting data relevant for the rule + ingest: + type: rest + rest: + # This is the path to the data source. Given that this will evaluate + # for each repository in the organization, we use a template that + # will be evaluated for each repository. The structure to use is the + # protobuf structure for the entity that is being evaluated. + endpoint: '/repos/{{.Entity.Owner}}/{{.Entity.Name}}/branches/{{ index .Params "branch" }}/protection' + # This is the method to use to retrieve the data. It should already default to JSON + parse: json + fallback: + - http_code: 404 + body: | + {"http_status": 404, "message": "Not Protected"} + # Defines the configuration for evaluating data ingested against the given policy + eval: + type: jq + jq: + - ingested: + def: ".allow_deletions.enabled" + profile: + def: ".allow_deletions" + # Defines the configuration for remediating the rule + remediate: + type: gh_branch_protection + gh_branch_protection: + patch: | + {"allow_deletions":{{ .Profile.allow_deletions }} } \ No newline at end of file diff --git a/examples/github/rule-types/branch_protection_allow_force_pushes.yaml b/examples/github/rule-types/branch_protection_allow_force_pushes.yaml new file mode 100644 index 0000000000..f52b0e6d24 --- /dev/null +++ b/examples/github/rule-types/branch_protection_allow_force_pushes.yaml @@ -0,0 +1,62 @@ +--- +version: v1 +type: rule-type +name: branch_protection_allow_force_pushes +context: + provider: github +description: Whether force pushes are allowed to the branch +guidance: | + ## Permit force pushes for all users with push access. + + For more information, see + https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule +def: + # Defines the section of the pipeline the rule will appear in. + # This will affect the template that is used to render multiple parts + # of the rule. + in_entity: repository + # Defines the schema for parameters that will be passed to the rule + param_schema: + properties: + branch: + type: string + description: "The name of the branch to check." + required: + - branch + # Defines the schema for writing a rule with this rule being checked + rule_schema: + properties: + allow_force_pushes: + type: boolean + description: "Permits force pushes to the protected branch by anyone with write access to the repository." + required: + - allow_force_pushes + # Defines the configuration for ingesting data relevant for the rule + ingest: + type: rest + rest: + # This is the path to the data source. Given that this will evaluate + # for each repository in the organization, we use a template that + # will be evaluated for each repository. The structure to use is the + # protobuf structure for the entity that is being evaluated. + endpoint: '/repos/{{.Entity.Owner}}/{{.Entity.Name}}/branches/{{ index .Params "branch" }}/protection' + # This is the method to use to retrieve the data. It should already default to JSON + parse: json + fallback: + - http_code: 404 + body: | + {"http_status": 404, "message": "Not Protected"} + # Defines the configuration for evaluating data ingested against the given policy + eval: + type: jq + jq: + - ingested: + def: ".allow_force_pushes.enabled" + profile: + def: ".allow_force_pushes" + # Defines the configuration for remediating the rule + remediate: + type: gh_branch_protection + gh_branch_protection: + patch: | + {"allow_force_pushes":{{ .Profile.allow_force_pushes }} } \ No newline at end of file diff --git a/examples/github/rule-types/branch_protection_allow_fork_syncing.yaml b/examples/github/rule-types/branch_protection_allow_fork_syncing.yaml new file mode 100644 index 0000000000..d01f5f9167 --- /dev/null +++ b/examples/github/rule-types/branch_protection_allow_fork_syncing.yaml @@ -0,0 +1,62 @@ +--- +version: v1 +type: rule-type +name: branch_protection_allow_fork_syncing +context: + provider: github +description: Whether users can pull changes from upstream when the branch is locked +guidance: | + ## A locked branch cannot be pulled from + + For more information, see + https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule +def: + # Defines the section of the pipeline the rule will appear in. + # This will affect the template that is used to render multiple parts + # of the rule. + in_entity: repository + # Defines the schema for parameters that will be passed to the rule + param_schema: + properties: + branch: + type: string + description: "The name of the branch to check." + required: + - branch + # Defines the schema for writing a rule with this rule being checked + rule_schema: + properties: + allow_fork_syncing: + type: boolean + description: "Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing." + required: + - allow_fork_syncing + # Defines the configuration for ingesting data relevant for the rule + ingest: + type: rest + rest: + # This is the path to the data source. Given that this will evaluate + # for each repository in the organization, we use a template that + # will be evaluated for each repository. The structure to use is the + # protobuf structure for the entity that is being evaluated. + endpoint: '/repos/{{.Entity.Owner}}/{{.Entity.Name}}/branches/{{ index .Params "branch" }}/protection' + # This is the method to use to retrieve the data. It should already default to JSON + parse: json + fallback: + - http_code: 404 + body: | + {"http_status": 404, "message": "Not Protected"} + # Defines the configuration for evaluating data ingested against the given policy + eval: + type: jq + jq: + - ingested: + def: ".allow_fork_syncing.enabled" + profile: + def: ".allow_fork_syncing" + # Defines the configuration for remediating the rule + remediate: + type: gh_branch_protection + gh_branch_protection: + patch: | + {"allow_fork_syncing":{{ .Profile.allow_fork_syncing }} } \ No newline at end of file diff --git a/examples/github/rule-types/branch_protection_enabled.yaml b/examples/github/rule-types/branch_protection_enabled.yaml new file mode 100644 index 0000000000..cf757af8c8 --- /dev/null +++ b/examples/github/rule-types/branch_protection_enabled.yaml @@ -0,0 +1,58 @@ +--- +version: v1 +type: rule-type +name: branch_protection_enabled +context: + provider: github +description: Verifies that a branch has a branch protection rule +guidance: | + You can protect important branches by setting branch protection rules, which define whether + collaborators can delete or force push to the branch and set requirements for any pushes to the branch, + such as passing status checks or a linear commit history. + + For more information, see + https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule +def: + # Defines the section of the pipeline the rule will appear in. + # This will affect the template that is used to render multiple parts + # of the rule. + in_entity: repository + # Defines the schema for parameters that will be passed to the rule + param_schema: + properties: + branch: + type: string + description: "The name of the branch to check." + required: + - branch + rule_schema: {} + # Defines the configuration for ingesting data relevant for the rule + ingest: + type: rest + rest: + # This is the path to the data source. Given that this will evaluate + # for each repository in the organization, we use a template that + # will be evaluated for each repository. The structure to use is the + # protobuf structure for the entity that is being evaluated. + endpoint: '/repos/{{.Entity.Owner}}/{{.Entity.Name}}/branches/{{ index .Params "branch" }}/protection' + # This is the method to use to retrieve the data. It should already default to JSON + parse: json + fallback: + - http_code: 404 + body: | + {"http_status": 404, "message": "Not Protected"} + eval: + type: rego + rego: + type: deny-by-default + def: | + package mediator + + import future.keywords.every + import future.keywords.if + + default allow := false + + allow if { + input.ingested.url != "" + } diff --git a/examples/github/rule-types/branch_protection_enforce_admins.yaml b/examples/github/rule-types/branch_protection_enforce_admins.yaml new file mode 100644 index 0000000000..5e7cdab4c2 --- /dev/null +++ b/examples/github/rule-types/branch_protection_enforce_admins.yaml @@ -0,0 +1,61 @@ +--- +version: v1 +type: rule-type +name: branch_protection_enforce_admins +context: + provider: github +description: Whether the protection rules apply to repository administrators +guidance: | + ## Enforce required status checks for repository administrators + + For more information, see + https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule +def: + # Defines the section of the pipeline the rule will appear in. + # This will affect the template that is used to render multiple parts + # of the rule. + in_entity: repository + # Defines the schema for parameters that will be passed to the rule + param_schema: + properties: + branch: + type: string + description: "The name of the branch to check." + required: + - branch + # Defines the schema for writing a rule with this rule being checked + rule_schema: + properties: + enforce_admins: + description: "Specifies whether the protection rule applies to repository administrators." + type: boolean + default: true + # Defines the configuration for ingesting data relevant for the rule + ingest: + type: rest + rest: + # This is the path to the data source. Given that this will evaluate + # for each repository in the organization, we use a template that + # will be evaluated for each repository. The structure to use is the + # protobuf structure for the entity that is being evaluated. + endpoint: '/repos/{{.Entity.Owner}}/{{.Entity.Name}}/branches/{{ index .Params "branch" }}/protection' + # This is the method to use to retrieve the data. It should already default to JSON + parse: json + fallback: + - http_code: 404 + body: | + {"http_status": 404, "message": "Not Protected"} + # Defines the configuration for evaluating data ingested against the given policy + eval: + type: jq + jq: + - ingested: + def: ".enforce_admins.enabled" + profile: + def: ".enforce_admins" + # Defines the configuration for remediating the rule + remediate: + type: gh_branch_protection + gh_branch_protection: + patch: | + {"enforce_admins": {{ .Profile.enforce_admins }} } \ No newline at end of file diff --git a/examples/github/rule-types/branch_protection_lock_branch.yaml b/examples/github/rule-types/branch_protection_lock_branch.yaml new file mode 100644 index 0000000000..c5af1c02b5 --- /dev/null +++ b/examples/github/rule-types/branch_protection_lock_branch.yaml @@ -0,0 +1,62 @@ +--- +version: v1 +type: rule-type +name: branch_protection_lock_branch +context: + provider: github +description: Whether the branch is locked +guidance: | + ## Can set the branch as read-only. Users cannot push to the branch. + + For more information, see + https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule +def: + # Defines the section of the pipeline the rule will appear in. + # This will affect the template that is used to render multiple parts + # of the rule. + in_entity: repository + # Defines the schema for parameters that will be passed to the rule + param_schema: + properties: + branch: + type: string + description: "The name of the branch to check." + required: + - branch + # Defines the schema for writing a rule with this rule being checked + rule_schema: + properties: + lock_branch: + type: boolean + description: "Whether to set the branch as read-only. If this is true, users will not be able to push to the branch." + required: + - lock_branch + # Defines the configuration for ingesting data relevant for the rule + ingest: + type: rest + rest: + # This is the path to the data source. Given that this will evaluate + # for each repository in the organization, we use a template that + # will be evaluated for each repository. The structure to use is the + # protobuf structure for the entity that is being evaluated. + endpoint: '/repos/{{.Entity.Owner}}/{{.Entity.Name}}/branches/{{ index .Params "branch" }}/protection' + # This is the method to use to retrieve the data. It should already default to JSON + parse: json + fallback: + - http_code: 404 + body: | + {"http_status": 404, "message": "Not Protected"} + # Defines the configuration for evaluating data ingested against the given policy + eval: + type: jq + jq: + - ingested: + def: ".lock_branch.enabled" + profile: + def: ".lock_branch" + # Defines the configuration for remediating the rule + remediate: + type: gh_branch_protection + gh_branch_protection: + patch: | + {"lock_branch":{{ .Profile.lock_branch }} } \ No newline at end of file diff --git a/examples/github/rule-types/branch_protection_require_conversation_resolution.yaml b/examples/github/rule-types/branch_protection_require_conversation_resolution.yaml new file mode 100644 index 0000000000..f00b4aca07 --- /dev/null +++ b/examples/github/rule-types/branch_protection_require_conversation_resolution.yaml @@ -0,0 +1,62 @@ +--- +version: v1 +type: rule-type +name: branch_protection_require_conversation_resolution +context: + provider: github +description: Whether PR reviews must be resolved before merging +guidance: | + ## When enabled, all conversations on code must be resolved before a pull request can be merged into a branch that matches this rule + + For more information, see + https://docs.github.com/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#require-conversation-resolution-before-merging +def: + # Defines the section of the pipeline the rule will appear in. + # This will affect the template that is used to render multiple parts + # of the rule. + in_entity: repository + # Defines the schema for parameters that will be passed to the rule + param_schema: + properties: + branch: + type: string + description: "The name of the branch to check." + required: + - branch + # Defines the schema for writing a rule with this rule being checked + rule_schema: + properties: + required_conversation_resolution: + type: boolean + description: "Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule." + required: + - required_conversation_resolution + # Defines the configuration for ingesting data relevant for the rule + ingest: + type: rest + rest: + # This is the path to the data source. Given that this will evaluate + # for each repository in the organization, we use a template that + # will be evaluated for each repository. The structure to use is the + # protobuf structure for the entity that is being evaluated. + endpoint: '/repos/{{.Entity.Owner}}/{{.Entity.Name}}/branches/{{ index .Params "branch" }}/protection' + # This is the method to use to retrieve the data. It should already default to JSON + parse: json + fallback: + - http_code: 404 + body: | + {"http_status": 404, "message": "Not Protected"} + # Defines the configuration for evaluating data ingested against the given policy + eval: + type: jq + jq: + - ingested: + def: ".required_conversation_resolution.enabled" + profile: + def: ".required_conversation_resolution" + # Defines the configuration for remediating the rule + remediate: + type: gh_branch_protection + gh_branch_protection: + patch: | + {"required_conversation_resolution":{{ .Profile.required_conversation_resolution }} } \ No newline at end of file diff --git a/examples/github/rule-types/branch_protection_require_linear_history.yaml b/examples/github/rule-types/branch_protection_require_linear_history.yaml new file mode 100644 index 0000000000..bb56dce7b9 --- /dev/null +++ b/examples/github/rule-types/branch_protection_require_linear_history.yaml @@ -0,0 +1,62 @@ +--- +version: v1 +type: rule-type +name: branch_protection_require_linear_history +context: + provider: github +description: Whether the branch requires a linear history with no merge commits +guidance: | + ## Prevent merge commits from being pushed to matching branches. + + For more information, see + https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule +def: + # Defines the section of the pipeline the rule will appear in. + # This will affect the template that is used to render multiple parts + # of the rule. + in_entity: repository + # Defines the schema for parameters that will be passed to the rule + param_schema: + properties: + branch: + type: string + description: "The name of the branch to check." + required: + - branch + # Defines the schema for writing a rule with this rule being checked + rule_schema: + properties: + required_linear_history: + type: boolean + description: "Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch." + required: + - required_linear_history + # Defines the configuration for ingesting data relevant for the rule + ingest: + type: rest + rest: + # This is the path to the data source. Given that this will evaluate + # for each repository in the organization, we use a template that + # will be evaluated for each repository. The structure to use is the + # protobuf structure for the entity that is being evaluated. + endpoint: '/repos/{{.Entity.Owner}}/{{.Entity.Name}}/branches/{{ index .Params "branch" }}/protection' + # This is the method to use to retrieve the data. It should already default to JSON + parse: json + fallback: + - http_code: 404 + body: | + {"http_status": 404, "message": "Not Protected"} + # Defines the configuration for evaluating data ingested against the given policy + eval: + type: jq + jq: + - ingested: + def: ".required_linear_history.enabled" + profile: + def: ".required_linear_history" + # Defines the configuration for remediating the rule + remediate: + type: gh_branch_protection + gh_branch_protection: + patch: | + {"required_linear_history":{{ .Profile.required_linear_history }} } \ No newline at end of file diff --git a/examples/github/rule-types/branch_protection_require_pull_request_approving_review_count.yaml b/examples/github/rule-types/branch_protection_require_pull_request_approving_review_count.yaml new file mode 100644 index 0000000000..7daa8bd910 --- /dev/null +++ b/examples/github/rule-types/branch_protection_require_pull_request_approving_review_count.yaml @@ -0,0 +1,62 @@ +--- +version: v1 +type: rule-type +name: branch_protection_require_pull_request_approving_review_count +context: + provider: github +description: Require a certain number of approving reviews before merging +guidance: | + ## Each pull request must have a certain number of approving reviews before it can be merged into a matching branch. + + For more information, see + https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule +def: + # Defines the section of the pipeline the rule will appear in. + # This will affect the template that is used to render multiple parts + # of the rule. + in_entity: repository + # Defines the schema for parameters that will be passed to the rule + param_schema: + properties: + branch: + type: string + description: "The name of the branch to check." + required: + - branch + # Defines the schema for writing a rule with this rule being checked + rule_schema: + properties: + required_approving_review_count: + description: "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers." + type: integer + required: + - required_approving_review_count + # Defines the configuration for ingesting data relevant for the rule + ingest: + type: rest + rest: + # This is the path to the data source. Given that this will evaluate + # for each repository in the organization, we use a template that + # will be evaluated for each repository. The structure to use is the + # protobuf structure for the entity that is being evaluated. + endpoint: '/repos/{{.Entity.Owner}}/{{.Entity.Name}}/branches/{{ index .Params "branch" }}/protection' + # This is the method to use to retrieve the data. It should already default to JSON + parse: json + fallback: + - http_code: 404 + body: | + {"http_status": 404, "message": "Not Protected"} + # Defines the configuration for evaluating data ingested against the given policy + eval: + type: jq + jq: + - ingested: + def: ".required_pull_request_reviews.required_approving_review_count" + profile: + def: ".required_approving_review_count" + # Defines the configuration for remediating the rule + remediate: + type: gh_branch_protection + gh_branch_protection: + patch: | + {"required_pull_request_reviews":{"required_approving_review_count":{{ .Profile.required_approving_review_count }}}} \ No newline at end of file diff --git a/examples/github/rule-types/branch_protection_require_pull_request_code_owners_review.yaml b/examples/github/rule-types/branch_protection_require_pull_request_code_owners_review.yaml new file mode 100644 index 0000000000..14fccf1a20 --- /dev/null +++ b/examples/github/rule-types/branch_protection_require_pull_request_code_owners_review.yaml @@ -0,0 +1,62 @@ +--- +version: v1 +type: rule-type +name: branch_protection_require_pull_request_code_owners_review +context: + provider: github +description: Verifies that a branch requires review from code owners. +guidance: | + ## Require an approved review in pull requests including files with a designated code owner. + + For more information, see + https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule +def: + # Defines the section of the pipeline the rule will appear in. + # This will affect the template that is used to render multiple parts + # of the rule. + in_entity: repository + # Defines the schema for parameters that will be passed to the rule + param_schema: + properties: + branch: + type: string + description: "The name of the branch to check." + required: + - branch + # Defines the schema for writing a rule with this rule being checked + rule_schema: + properties: + require_code_owner_reviews: + description: "Set to true to require an approved review in pull requests including files with a designated code owner." + type: boolean + required: + - require_code_owner_reviews + # Defines the configuration for ingesting data relevant for the rule + ingest: + type: rest + rest: + # This is the path to the data source. Given that this will evaluate + # for each repository in the organization, we use a template that + # will be evaluated for each repository. The structure to use is the + # protobuf structure for the entity that is being evaluated. + endpoint: '/repos/{{.Entity.Owner}}/{{.Entity.Name}}/branches/{{ index .Params "branch" }}/protection' + # This is the method to use to retrieve the data. It should already default to JSON + parse: json + fallback: + - http_code: 404 + body: | + {"http_status": 404, "message": "Not Protected"} + # Defines the configuration for evaluating data ingested against the given policy + eval: + type: jq + jq: + - ingested: + def: ".required_pull_request_reviews.require_code_owner_reviews" + profile: + def: ".require_code_owner_reviews" + # Defines the configuration for remediating the rule + remediate: + type: gh_branch_protection + gh_branch_protection: + patch: | + {"required_pull_request_reviews":{"require_code_owner_reviews":{{ .Profile.require_code_owner_reviews }}}} diff --git a/examples/github/rule-types/branch_protection_require_pull_request_dismiss_stale_reviews.yaml b/examples/github/rule-types/branch_protection_require_pull_request_dismiss_stale_reviews.yaml new file mode 100644 index 0000000000..0c236b684c --- /dev/null +++ b/examples/github/rule-types/branch_protection_require_pull_request_dismiss_stale_reviews.yaml @@ -0,0 +1,62 @@ +--- +version: v1 +type: rule-type +name: branch_protection_require_pull_request_dismiss_stale_reviews +context: + provider: github +description: Require that new pushes to the branch dismiss old reviews +guidance: | + ## New reviewable commits pushed to a matching branch will dismiss pull request review approvals. + + For more information, see + https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule +def: + # Defines the section of the pipeline the rule will appear in. + # This will affect the template that is used to render multiple parts + # of the rule. + in_entity: repository + # Defines the schema for parameters that will be passed to the rule + param_schema: + properties: + branch: + type: string + description: "The name of the branch to check." + required: + - branch + # Defines the schema for writing a rule with this rule being checked + rule_schema: + properties: + dismiss_stale_reviews: + description: "Set to true to dismiss approving reviews when someone pushes a new commit." + type: boolean + required: + - dismiss_stale_reviews + # Defines the configuration for ingesting data relevant for the rule + ingest: + type: rest + rest: + # This is the path to the data source. Given that this will evaluate + # for each repository in the organization, we use a template that + # will be evaluated for each repository. The structure to use is the + # protobuf structure for the entity that is being evaluated. + endpoint: '/repos/{{.Entity.Owner}}/{{.Entity.Name}}/branches/{{ index .Params "branch" }}/protection' + # This is the method to use to retrieve the data. It should already default to JSON + parse: json + fallback: + - http_code: 404 + body: | + {"http_status": 404, "message": "Not Protected"} + # Defines the configuration for evaluating data ingested against the given policy + eval: + type: jq + jq: + - ingested: + def: ".required_pull_request_reviews.dismiss_stale_reviews" + profile: + def: ".dismiss_stale_reviews" + # Defines the configuration for remediating the rule + remediate: + type: gh_branch_protection + gh_branch_protection: + patch: | + {"required_pull_request_reviews":{"dismiss_stale_reviews":{{ .Profile.dismiss_stale_reviews }}}} \ No newline at end of file diff --git a/examples/github/rule-types/branch_protection_require_pull_request_push_approval.yaml b/examples/github/rule-types/branch_protection_require_pull_request_push_approval.yaml new file mode 100644 index 0000000000..459163ca0d --- /dev/null +++ b/examples/github/rule-types/branch_protection_require_pull_request_push_approval.yaml @@ -0,0 +1,61 @@ +--- +version: v1 +type: rule-type +name: branch_protection_require_pull_request_last_push_approval +context: + provider: github +description: Require that the most recent push to a branch be approved by someone other than the person who pushed it. +guidance: | + ## The most recent push to a branch must be approved by someone other than the person who pushed it. + + For more information, see + https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule +def: + # Defines the section of the pipeline the rule will appear in. + # This will affect the template that is used to render multiple parts + # of the rule. + in_entity: repository + # Defines the schema for parameters that will be passed to the rule + param_schema: + properties: + branch: + type: string + description: "The name of the branch to check." + required: + - branch + # Defines the schema for writing a rule with this rule being checked + rule_schema: + properties: + require_last_push_approval: + description: "Whether the most recent push must be approved by someone other than the person who pushed it." + type: boolean + default: false + # Defines the configuration for ingesting data relevant for the rule + ingest: + type: rest + rest: + # This is the path to the data source. Given that this will evaluate + # for each repository in the organization, we use a template that + # will be evaluated for each repository. The structure to use is the + # protobuf structure for the entity that is being evaluated. + endpoint: '/repos/{{.Entity.Owner}}/{{.Entity.Name}}/branches/{{ index .Params "branch" }}/protection' + # This is the method to use to retrieve the data. It should already default to JSON + parse: json + fallback: + - http_code: 404 + body: | + {"http_status": 404, "message": "Not Protected"} + # Defines the configuration for evaluating data ingested against the given policy + eval: + type: jq + jq: + - ingested: + def: ".required_pull_request_reviews.require_last_push_approval" + profile: + def: ".require_last_push_approval" + # Defines the configuration for remediating the rule + remediate: + type: gh_branch_protection + gh_branch_protection: + patch: | + {"required_pull_request_reviews":{"require_last_push_approval":{{ .Profile.require_last_push_approval }}}} \ No newline at end of file diff --git a/examples/github/rule-types/branch_protection_require_pull_requests.yaml b/examples/github/rule-types/branch_protection_require_pull_requests.yaml new file mode 100644 index 0000000000..58960905a0 --- /dev/null +++ b/examples/github/rule-types/branch_protection_require_pull_requests.yaml @@ -0,0 +1,76 @@ +--- +version: v1 +type: rule-type +name: branch_protection_require_pull_requests +context: + provider: github +description: Verifies that a branch requires pull requests +guidance: | + ## Require that a pull request be opened before merging to a branch. + + For more information, see + https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule +def: + # Defines the section of the pipeline the rule will appear in. + # This will affect the template that is used to render multiple parts + # of the rule. + in_entity: repository + # Defines the schema for parameters that will be passed to the rule + param_schema: + properties: + branch: + type: string + description: "The name of the branch to check." + required: + - branch + # Defines the schema for writing a rule with this rule being checked + rule_schema: + properties: + required_pull_request_reviews: + type: boolean + description: | + When enabled, all commits must be made to a non-protected branch and + submitted via a pull request before they can be merged into a branch + that matches this rule. + required: + - required_pull_request_reviews + # Defines the configuration for ingesting data relevant for the rule + ingest: + type: rest + rest: + # This is the path to the data source. Given that this will evaluate + # for each repository in the organization, we use a template that + # will be evaluated for each repository. The structure to use is the + # protobuf structure for the entity that is being evaluated. + endpoint: '/repos/{{.Entity.Owner}}/{{.Entity.Name}}/branches/{{ index .Params "branch" }}/protection' + # This is the method to use to retrieve the data. It should already default to JSON + parse: json + fallback: + - http_code: 404 + body: | + {"http_status": 404, "message": "Not Protected"} + # Defines the configuration for evaluating data ingested against the given policy + eval: + type: rego + rego: + type: deny-by-default + def: | + package mediator + + import future.keywords.every + import future.keywords.if + + default allow := false + + allow if { + input.ingested.required_pull_request_reviews.url != "" + } + # Defines the configuration for remediating the rule + remediate: + type: gh_branch_protection + gh_branch_protection: + # Note that this rule will ever only fail if there are no PR settings at all, + # so we can safely set the entire PR settings to an empty object. In that case, + # GH is actually helpful and selects sane defaults + patch: | + {"required_pull_request_reviews":{}} \ No newline at end of file diff --git a/examples/github/rule-types/branch_protection_require_signatures.yaml b/examples/github/rule-types/branch_protection_require_signatures.yaml new file mode 100644 index 0000000000..6e466ec312 --- /dev/null +++ b/examples/github/rule-types/branch_protection_require_signatures.yaml @@ -0,0 +1,56 @@ +--- +version: v1 +type: rule-type +name: branch_protection_require_signatures +context: + provider: github +description: Whether commits to the branch must be signed +guidance: | + ## Commits pushed to matching branches must have verified signatures. + + For more information, see + https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule +def: + # Defines the section of the pipeline the rule will appear in. + # This will affect the template that is used to render multiple parts + # of the rule. + in_entity: repository + # Defines the schema for parameters that will be passed to the rule + param_schema: + properties: + branch: + type: string + description: "The name of the branch to check." + required: + - branch + # Defines the schema for writing a rule with this rule being checked + rule_schema: + properties: + required_signatures: + description: "Specifies whether commits to the branch must be signed." + type: boolean + required: + - required_signatures + # Defines the configuration for ingesting data relevant for the rule + ingest: + type: rest + rest: + # This is the path to the data source. Given that this will evaluate + # for each repository in the organization, we use a template that + # will be evaluated for each repository. The structure to use is the + # protobuf structure for the entity that is being evaluated. + endpoint: '/repos/{{.Entity.Owner}}/{{.Entity.Name}}/branches/{{ index .Params "branch" }}/protection' + # This is the method to use to retrieve the data. It should already default to JSON + parse: json + fallback: + - http_code: 404 + body: | + {"http_status": 404, "message": "Not Protected"} + # Defines the configuration for evaluating data ingested against the given policy + eval: + type: jq + jq: + - ingested: + def: ".required_signatures.enabled" + profile: + def: ".required_signatures" \ No newline at end of file diff --git a/go.mod b/go.mod index 68af1e5e70..d36fce7d85 100644 --- a/go.mod +++ b/go.mod @@ -67,6 +67,7 @@ require ( github.com/charmbracelet/bubbletea v0.24.1 // indirect github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/evanphx/json-patch/v5 v5.7.0 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/gorilla/schema v1.2.0 // indirect github.com/lestrrat-go/blackmagic v1.0.2 // indirect diff --git a/go.sum b/go.sum index c6751cc185..c4193154ac 100644 --- a/go.sum +++ b/go.sum @@ -161,6 +161,7 @@ github.com/aliyun/credentials-go v1.1.2/go.mod h1:ozcZaMR5kLM7pwtCMEpVmQ242suV6q github.com/aliyun/credentials-go v1.2.3 h1:Vmodnr52Rz1mcbwn0kzMhLRKb6soizewuKXdfZiNemU= github.com/aliyun/credentials-go v1.2.3/go.mod h1:/KowD1cfGSLrLsH28Jr8W+xwoId0ywIy5lNzDz6O1vw= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -168,6 +169,7 @@ github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5 github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= @@ -236,6 +238,7 @@ github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdn github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/bytecodealliance/wasmtime-go/v3 v3.0.2 h1:3uZCA/BLTIu+DqCfguByNMJa2HVHpXvjfy0Dy7g6fuA= +github.com/cavaliercoder/go-cpio v0.0.0-20180626203310-925f9528c45e/go.mod h1:oDpT4efm8tSYHXV5tHSdRvBet/b/QzxZ+XyyPehvm3A= github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/cenkalti/backoff/v3 v3.2.2 h1:cfUAAO3yvKMYKPrvhDuHSwQnhZNk/RMHKdZqKTxfm6M= github.com/cenkalti/backoff/v3 v3.2.2/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= @@ -344,6 +347,8 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= +github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= +github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw= github.com/facebookgo/limitgroup v0.0.0-20150612190941-6abd8d71ec01 h1:IeaD1VDVBPlx3viJT9Md8if8IxxJnO+x0JCGb054heg= github.com/facebookgo/muster v0.0.0-20150708232844-fd3d7953fd52 h1:a4DFiKFJiDRGFD1qIcqGLX/WlUMD9dyLSLDt+9QZgt8= @@ -353,6 +358,7 @@ github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBd github.com/fergusstrange/embedded-postgres v1.24.0 h1:WqXbmYrBeT5JfNWQ8Qa+yHa5YJO/0sBIgL9k5rn3dFk= github.com/fergusstrange/embedded-postgres v1.24.0/go.mod h1:wL562t1V+iuFwq0UcgMi2e9rp8CROY9wxWZEfP8Y874= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/foxcpp/go-mockdns v1.0.0 h1:7jBqxd3WDWwi/6WhDvacvH1XsN3rOLXyHM1uhvIx6FI= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -384,6 +390,7 @@ github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxF github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -565,6 +572,7 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/tink/go v1.7.0 h1:6Eox8zONGebBFcCBqkVmt60LaWZa6xg1cl/DwAh/J1w= @@ -595,6 +603,7 @@ github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1 h1:HcUWd006luQPljE73d5sk+ github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1/go.mod h1:w9Y7gY31krpLmrVU5ZPG9H7l9fZuRu5/3R3S3FMtVQ4= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 h1:RtRsiaGvWxcwd8y3BiRZxsylPT8hLWZ5SPcfI+3IDNk= github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0/go.mod h1:TzP6duP4Py2pHLVPPQp42aoYI92+PCrVotyR5e8Vqlk= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= @@ -667,6 +676,7 @@ github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqx github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -675,6 +685,7 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= @@ -699,6 +710,7 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/lestrrat-go/blackmagic v1.0.2 h1:Cg2gVSc9h7sz9NOByczrbUvLopQmXrfFx//N+AkAr5k= @@ -716,6 +728,7 @@ github.com/lestrrat-go/option v1.0.1 h1:oAzP2fvZGQKWkvHa1/SAcFolBEca1oN+mQ7eooNB github.com/lestrrat-go/option v1.0.1/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf h1:ndns1qx/5dL43g16EQkPV/i8+b3l5bYQwLeoSBe7tS8= github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf/go.mod h1:aGkAgvWY/IUcVFfuly53REpfv5edu25oij+qHRFaraA= +github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lithammer/shortuuid/v3 v3.0.4/go.mod h1:RviRjexKqIzx/7r1peoAITm6m7gnif/h+0zmolKJjzw= @@ -805,6 +818,8 @@ github.com/muhlemmer/httpforwarded v0.1.0 h1:x4DLrzXdliq8mprgUMR0olDvHGkou5BJsK/ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nozzle/throttler v0.0.0-20180817012639-2ea982251481 h1:Up6+btDp321ZG5/zdSLo48H9Iaq0UQGthrhWC6pCxzE= github.com/nozzle/throttler v0.0.0-20180817012639-2ea982251481/go.mod h1:yKZQO8QE2bHlgozqWDiRVqTFlLQSj30K/6SAK8EeYFw= @@ -885,6 +900,7 @@ github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUc github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -950,6 +966,7 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1 github.com/smartystreets/assertions v1.1.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/sony/gobreaker v0.5.0 h1:dRCvqm0P490vZPmy7ppEk2qCnCieBooFJ+YoXGYB+yg= github.com/sony/gobreaker v0.5.0/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= @@ -1015,6 +1032,8 @@ github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHT github.com/tjfoc/gmsm v1.3.2 h1:7JVkAn5bvUJ7HtU08iW6UiD+UTmJTIToHCfeFzkcCxM= github.com/tjfoc/gmsm v1.3.2/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= github.com/transparency-dev/merkle v0.0.2 h1:Q9nBoQcZcgPamMkGn7ghV8XiTZ/kRxn1yCG81+twTK4= github.com/transparency-dev/merkle v0.0.2/go.mod h1:pqSy+OXefQ1EDUVmAJ8MUhHB9TXGuzVAT58PqBoHz1A= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= @@ -1541,6 +1560,7 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= @@ -1550,6 +1570,7 @@ gopkg.in/ini.v1 v1.56.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= diff --git a/internal/engine/actions/remediate/gh_branch_protect/gh_branch_protect.go b/internal/engine/actions/remediate/gh_branch_protect/gh_branch_protect.go new file mode 100644 index 0000000000..6b2aa8aa10 --- /dev/null +++ b/internal/engine/actions/remediate/gh_branch_protect/gh_branch_protect.go @@ -0,0 +1,298 @@ +// Copyright 2023 Stacklok, Inc. +// +// 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 +// +// http://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. + +// Package gh_branch_protect provides the github branch protection remediation engine +package gh_branch_protect + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "log" + "net/http" + "text/template" + + jsonpatch "github.com/evanphx/json-patch/v5" + "github.com/google/go-github/v53/github" + "github.com/rs/zerolog" + "google.golang.org/protobuf/reflect/protoreflect" + + "github.com/stacklok/mediator/internal/engine/interfaces" + "github.com/stacklok/mediator/internal/providers" + "github.com/stacklok/mediator/internal/util" + pb "github.com/stacklok/mediator/pkg/api/protobuf/go/mediator/v1" + provifv1 "github.com/stacklok/mediator/pkg/providers/v1" +) + +const ( + // RemediateType is the type of the REST remediation engine + RemediateType = "gh_branch_protection" +) + +// GhBranchProtectRemediator keeps the status for a rule type that uses GH API to remediate branch protection +type GhBranchProtectRemediator struct { + actionType interfaces.ActionType + cli provifv1.GitHub + patchTemplate *template.Template +} + +// NewGhBranchProtectRemediator creates a new remediation engine that uses the GitHub API for branch protection +func NewGhBranchProtectRemediator( + actionType interfaces.ActionType, + ghp *pb.RuleType_Definition_Remediate_GhBranchProtectionType, + pbuild *providers.ProviderBuilder, +) (*GhBranchProtectRemediator, error) { + if actionType == "" { + return nil, fmt.Errorf("action type cannot be empty") + } + + patchTemplate, err := util.ParseNewTemplate(&ghp.Patch, "patch") + if err != nil { + return nil, fmt.Errorf("cannot parse patch template: %w", err) + } + + cli, err := pbuild.GetGitHub(context.Background()) + if err != nil { + return nil, fmt.Errorf("cannot get http client: %w", err) + } + return &GhBranchProtectRemediator{ + actionType: actionType, + cli: cli, + patchTemplate: patchTemplate, + }, nil +} + +// PatchTemplateParams is the parameters for the REST endpoint template +type PatchTemplateParams struct { + // Entity is the entity to be evaluated + Entity any + // Profile are the parameters to be used in the template + Profile map[string]any + // Profile are the parameters to be used in the template + Params map[string]any +} + +// Type returns the action type of the remediation engine +func (r *GhBranchProtectRemediator) Type() interfaces.ActionType { + return r.actionType +} + +// GetOnOffState returns the alert action state read from the profile +func (_ *GhBranchProtectRemediator) GetOnOffState(p *pb.Profile) interfaces.ActionOpt { + return interfaces.ActionOptFromString(p.Remediate) +} + +// Do perform the remediation +func (r *GhBranchProtectRemediator) Do( + ctx context.Context, + _ interfaces.ActionCmd, + remAction interfaces.ActionOpt, + ent protoreflect.ProtoMessage, + pol map[string]any, + params map[string]any, +) error { + retp := &PatchTemplateParams{ + Entity: ent, + Profile: pol, + Params: params, + } + + repo, ok := ent.(*pb.Repository) + if !ok { + return fmt.Errorf("expected repository, got %T", ent) + } + + branch, err := util.JQReadFrom[string](ctx, ".branch", params) + if err != nil { + return fmt.Errorf("error reading branch from params: %w", err) + } + + // get the current protection + res, err := r.cli.GetBranchProtection(ctx, repo.Owner, repo.Name, branch) + if errors.Is(err, github.ErrBranchNotProtected) { + // this will create a new branch protection using github's defaults + // which appear quite sensible + res = &github.Protection{} + } else if err != nil { + return fmt.Errorf("error getting branch protection: %w", err) + } + + req := protectionResultToRequest(res) + + var patch bytes.Buffer + err = r.patchTemplate.Execute(&patch, retp) + if err != nil { + return fmt.Errorf("cannot execute endpoint template: %w", err) + } + + zerolog.Ctx(ctx).Debug().Str("patch", patch.String()).Msg("patch") + + updatedRequest, err := patchRequest(req, patch.Bytes()) + if err != nil { + return fmt.Errorf("error patching request: %w", err) + } + + switch remAction { + case interfaces.ActionOptOn: + err = r.cli.UpdateBranchProtection(ctx, repo.Owner, repo.Name, branch, updatedRequest) + case interfaces.ActionOptDryRun: + err = dryRun(r.cli.GetBaseURL(), repo.Owner, repo.Name, branch, updatedRequest) + case interfaces.ActionOptOff, interfaces.ActionOptUnknown: + err = errors.New("unexpected action") + } + return err +} + +func dryRun(baseUrl, owner, repo, branch string, req *github.ProtectionRequest) error { + jsonReq, err := json.Marshal(req) + if err != nil { + log.Fatalf("Error marshalling data: %v", err) + } + + endpoint := fmt.Sprintf("repos/%v/%v/branches/%v/protection", owner, repo, branch) + curlCmd, err := util.GenerateCurlCommand(http.MethodPut, baseUrl, endpoint, string(jsonReq)) + if err != nil { + return fmt.Errorf("cannot generate curl command: %w", err) + } + + log.Printf("run the following curl command: \n%s\n", curlCmd) + return nil +} + +func patchRequest( + req *github.ProtectionRequest, + patch []byte, +) (*github.ProtectionRequest, error) { + jReq, err := json.Marshal(req) + if err != nil { + return nil, fmt.Errorf("error marshalling request: %w", err) + } + + mergedBytes, err := jsonpatch.MergePatch(jReq, patch) + if err != nil { + return nil, fmt.Errorf("error merging patch: %w", err) + } + + merged := &github.ProtectionRequest{} + err = json.Unmarshal(mergedBytes, merged) + if err != nil { + return nil, fmt.Errorf("error unmarshalling merged request: %w", err) + } + + return merged, nil +} + +func protectionResultToRequest(res *github.Protection) *github.ProtectionRequest { + req := &github.ProtectionRequest{ + Restrictions: branchRestrictionResponseToRequest(res.Restrictions), + RequiredPullRequestReviews: pullRequestReviewsResponseToRequest(res.RequiredPullRequestReviews), + RequiredStatusChecks: res.RequiredStatusChecks, + } + + if res.EnforceAdmins != nil { + req.EnforceAdmins = res.EnforceAdmins.Enabled + } + + if res.AllowForkSyncing != nil { + req.AllowForkSyncing = res.AllowForkSyncing.Enabled + } + if res.LockBranch != nil { + req.LockBranch = res.LockBranch.Enabled + } + if res.BlockCreations != nil { + req.BlockCreations = res.BlockCreations.Enabled + } + if res.RequiredConversationResolution != nil { + req.RequiredConversationResolution = github.Bool(res.RequiredConversationResolution.Enabled) + } + if res.AllowDeletions != nil { + req.AllowDeletions = github.Bool(res.AllowDeletions.Enabled) + } + if res.AllowForcePushes != nil { + req.AllowForcePushes = github.Bool(res.AllowForcePushes.Enabled) + } + if res.RequireLinearHistory != nil { + req.RequireLinearHistory = github.Bool(res.RequireLinearHistory.Enabled) + } + + return req +} + +func branchRestrictionResponseToRequest(res *github.BranchRestrictions) *github.BranchRestrictionsRequest { + if res == nil { + return nil + } + return &github.BranchRestrictionsRequest{ + Users: userSliceToStringSlice(res.Users), + Teams: sluggerSliceToStringSlice(res.Teams), + Apps: sluggerSliceToStringSlice(res.Teams), + } +} + +func pullRequestReviewsResponseToRequest(res *github.PullRequestReviewsEnforcement) *github.PullRequestReviewsEnforcementRequest { + if res == nil { + return nil + } + req := &github.PullRequestReviewsEnforcementRequest{ + DismissStaleReviews: res.DismissStaleReviews, + RequireCodeOwnerReviews: res.RequireCodeOwnerReviews, + RequiredApprovingReviewCount: res.RequiredApprovingReviewCount, + RequireLastPushApproval: github.Bool(res.RequireLastPushApproval), + } + + if res.BypassPullRequestAllowances != nil { + req.BypassPullRequestAllowancesRequest = &github.BypassPullRequestAllowancesRequest{ + Users: userSliceToStringSlice(res.BypassPullRequestAllowances.Users), + Teams: sluggerSliceToStringSlice(res.BypassPullRequestAllowances.Teams), + Apps: sluggerSliceToStringSlice(res.BypassPullRequestAllowances.Apps), + } + } + + if res.DismissalRestrictions != nil { + users := userSliceToStringSlice(res.DismissalRestrictions.Users) + teams := sluggerSliceToStringSlice(res.DismissalRestrictions.Teams) + apps := sluggerSliceToStringSlice(res.DismissalRestrictions.Apps) + req.DismissalRestrictionsRequest = &github.DismissalRestrictionsRequest{ + Users: &users, + Teams: &teams, + Apps: &apps, + } + } + + return req +} + +func userSliceToStringSlice(users []*github.User) []string { + // nil slice throws error, explicitly create an empty slice + userStrs := make([]string, 0) // using make + for _, user := range users { + userStrs = append(userStrs, user.GetLogin()) + } + return userStrs +} + +type slugger interface { + GetSlug() string +} + +func sluggerSliceToStringSlice[S slugger](items []S) []string { + // nil slice throws error, explicitly create an empty slice + strs := make([]string, 0) + for _, item := range items { + strs = append(strs, item.GetSlug()) + } + return strs +} diff --git a/internal/engine/actions/remediate/gh_branch_protect/gh_branch_protect_test.go b/internal/engine/actions/remediate/gh_branch_protect/gh_branch_protect_test.go new file mode 100644 index 0000000000..231728e003 --- /dev/null +++ b/internal/engine/actions/remediate/gh_branch_protect/gh_branch_protect_test.go @@ -0,0 +1,281 @@ +// Copyright 2023 Stacklok, Inc. +// +// 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 +// +// http://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. + +// Package gh_branch_protect provides the github branch protection remediation engine +package gh_branch_protect + +import ( + "context" + "encoding/json" + "fmt" + "strings" + "testing" + + "github.com/golang/mock/gomock" + "github.com/google/go-github/v53/github" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/reflect/protoreflect" + + "github.com/stacklok/mediator/internal/db" + "github.com/stacklok/mediator/internal/engine/interfaces" + "github.com/stacklok/mediator/internal/providers" + mock_ghclient "github.com/stacklok/mediator/internal/providers/github/mock" + pb "github.com/stacklok/mediator/pkg/api/protobuf/go/mediator/v1" + provifv1 "github.com/stacklok/mediator/pkg/providers/v1" +) + +const ( + ghApiUrl = "https://api.github.com" + reviewCountPatch = `{"required_pull_request_reviews":{"required_approving_review_count":{{ .Profile.required_approving_review_count }}}}` + + repoOwner = "stacklok" + repoName = "mediator" +) + +var TestActionTypeValid interfaces.ActionType = "remediate-test" + +func testGithubProviderBuilder(baseURL string) *providers.ProviderBuilder { + if !strings.HasSuffix(baseURL, "/") { + baseURL = baseURL + "/" + } + + definitionJSON := `{ + "github": { + "endpoint": "` + baseURL + `" + } + }` + + return providers.NewProviderBuilder( + &db.Provider{ + Name: "github", + Version: provifv1.V1, + Implements: []db.ProviderType{db.ProviderTypeGithub, db.ProviderTypeRest}, + Definition: json.RawMessage(definitionJSON), + }, + db.ProviderAccessToken{}, + "token", + ) +} + +type protectionRequestMatcher struct { + exp *github.ProtectionRequest +} + +func (m *protectionRequestMatcher) Matches(x interface{}) bool { + req, ok := x.(*github.ProtectionRequest) + if !ok { + return false + } + + if m.exp.AllowForcePushes != nil { + if req.AllowForcePushes == nil { + return false + } + + if *req.AllowForcePushes != *m.exp.AllowForcePushes { + return false + } + } + + return req.RequiredPullRequestReviews.RequiredApprovingReviewCount == m.exp.RequiredPullRequestReviews.RequiredApprovingReviewCount && + req.AllowDeletions == m.exp.AllowDeletions +} + +func (m *protectionRequestMatcher) String() string { + return fmt.Sprintf("is equivalent to proto %+v", m.exp) +} + +func eqProtectionRequest(exp *github.ProtectionRequest) gomock.Matcher { + return &protectionRequestMatcher{exp} +} + +func TestBranchProtectionRemediate(t *testing.T) { + t.Parallel() + + ctrl := gomock.NewController(t) + t.Cleanup(func() { + ctrl.Finish() + }) + + type remediateArgs struct { + remAction interfaces.ActionOpt + ent protoreflect.ProtoMessage + pol map[string]any + params map[string]any + } + + type newBranchProtectionRemediateArgs struct { + ghp *pb.RuleType_Definition_Remediate_GhBranchProtectionType + pbuild *providers.ProviderBuilder + actionType interfaces.ActionType + } + + tests := []struct { + name string + newRemArgs *newBranchProtectionRemediateArgs + remArgs *remediateArgs + mockSetup func(*mock_ghclient.MockGitHub) + wantErr bool + wantInitErr bool + }{ + { + name: "invalid action type", + newRemArgs: &newBranchProtectionRemediateArgs{ + ghp: &pb.RuleType_Definition_Remediate_GhBranchProtectionType{ + Patch: reviewCountPatch, + }, + pbuild: testGithubProviderBuilder(ghApiUrl), + actionType: "", + }, + mockSetup: func(mockGitHub *mock_ghclient.MockGitHub) { + }, + remArgs: &remediateArgs{ + remAction: interfaces.ActionOptOn, + ent: &pb.Repository{ + Owner: repoOwner, + Name: repoName, + }, + pol: map[string]any{ + "required_approving_review_count": 2, + }, + params: map[string]any{ + "branch": "main", + }, + }, + wantInitErr: true, + }, + { + name: "No protection was in place", + newRemArgs: &newBranchProtectionRemediateArgs{ + ghp: &pb.RuleType_Definition_Remediate_GhBranchProtectionType{ + Patch: reviewCountPatch, + }, + pbuild: testGithubProviderBuilder(ghApiUrl), + actionType: TestActionTypeValid, + }, + remArgs: &remediateArgs{ + remAction: interfaces.ActionOptOn, + ent: &pb.Repository{ + Owner: repoOwner, + Name: repoName, + }, + pol: map[string]any{ + "required_approving_review_count": 2, + }, + params: map[string]any{ + "branch": "main", + }, + }, + mockSetup: func(mockGitHub *mock_ghclient.MockGitHub) { + mockGitHub.EXPECT(). + GetBranchProtection(gomock.Any(), repoOwner, repoName, "main"). + Return(nil, github.ErrBranchNotProtected) + mockGitHub.EXPECT(). + UpdateBranchProtection(gomock.Any(), repoOwner, repoName, "main", + // nested pointers to structs confuse gmock + eqProtectionRequest( + &github.ProtectionRequest{ + RequiredPullRequestReviews: &github.PullRequestReviewsEnforcementRequest{ + RequiredApprovingReviewCount: 2, + }, + }, + ), + ). + Return(nil) + }, + }, + { + name: "Some protection was in place, remediator merges the patch", + newRemArgs: &newBranchProtectionRemediateArgs{ + ghp: &pb.RuleType_Definition_Remediate_GhBranchProtectionType{ + Patch: reviewCountPatch, + }, + pbuild: testGithubProviderBuilder(ghApiUrl), + actionType: TestActionTypeValid, + }, + remArgs: &remediateArgs{ + remAction: interfaces.ActionOptOn, + ent: &pb.Repository{ + Owner: repoOwner, + Name: repoName, + }, + pol: map[string]any{ + "required_approving_review_count": 2, + }, + params: map[string]any{ + "branch": "main", + }, + }, + mockSetup: func(mockGitHub *mock_ghclient.MockGitHub) { + mockGitHub.EXPECT(). + GetBranchProtection(gomock.Any(), repoOwner, repoName, "main"). + Return( + &github.Protection{ + RequiredPullRequestReviews: &github.PullRequestReviewsEnforcement{ + RequiredApprovingReviewCount: 1, + }, + AllowForcePushes: &github.AllowForcePushes{Enabled: true}, + }, + nil) + + mockGitHub.EXPECT(). + UpdateBranchProtection(gomock.Any(), repoOwner, repoName, "main", + // nested pointers to structs confuse gmock + eqProtectionRequest( + &github.ProtectionRequest{ + RequiredPullRequestReviews: &github.PullRequestReviewsEnforcementRequest{ + RequiredApprovingReviewCount: 2, + }, + AllowForcePushes: github.Bool(true), + }, + ), + ). + Return(nil) + }, + }, + } + + mockClient := mock_ghclient.NewMockGitHub(ctrl) + + for _, tt := range tests { + tt := tt + + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + engine, err := NewGhBranchProtectRemediator(tt.newRemArgs.actionType, tt.newRemArgs.ghp, tt.newRemArgs.pbuild) + if tt.wantInitErr { + require.Error(t, err, "expected error") + return + } + + require.NoError(t, err, "unexpected error creating remediate engine") + // TODO(jakub): providerBuilder should be an interface so we can pass in mock more easily + engine.cli = mockClient + + require.NoError(t, err, "unexpected error creating remediate engine") + require.NotNil(t, engine, "expected non-nil remediate engine") + + tt.mockSetup(mockClient) + + err = engine.Do(context.Background(), interfaces.ActionCmdOn, tt.remArgs.remAction, tt.remArgs.ent, tt.remArgs.pol, tt.remArgs.params) + if tt.wantErr { + require.Error(t, err, "expected error") + return + } + + require.NoError(t, err, "unexpected error running remediate engine") + }) + } +} diff --git a/internal/engine/actions/remediate/remediate.go b/internal/engine/actions/remediate/remediate.go index 912b7cbc94..e497c01e12 100644 --- a/internal/engine/actions/remediate/remediate.go +++ b/internal/engine/actions/remediate/remediate.go @@ -20,6 +20,7 @@ package remediate import ( "fmt" + "github.com/stacklok/mediator/internal/engine/actions/remediate/gh_branch_protect" "github.com/stacklok/mediator/internal/engine/actions/remediate/noop" "github.com/stacklok/mediator/internal/engine/actions/remediate/rest" engif "github.com/stacklok/mediator/internal/engine/interfaces" @@ -44,6 +45,12 @@ func NewRuleRemediator(rt *pb.RuleType, pbuild *providers.ProviderBuilder) (engi return nil, fmt.Errorf("remediations engine missing rest configuration") } return rest.NewRestRemediate(ActionType, rem.GetRest(), pbuild) + + case gh_branch_protect.RemediateType: + if rem.GetGhBranchProtection() == nil { + return nil, fmt.Errorf("remediations engine missing gh_branch_protection configuration") + } + return gh_branch_protect.NewGhBranchProtectRemediator(ActionType, rem.GetGhBranchProtection(), pbuild) } return nil, fmt.Errorf("unknown remediation type: %s", rem.GetType()) diff --git a/internal/providers/github/github_rest.go b/internal/providers/github/github_rest.go index 355fe05488..d9f82e54ac 100644 --- a/internal/providers/github/github_rest.go +++ b/internal/providers/github/github_rest.go @@ -411,6 +411,14 @@ func (c *RestClient) GetBranchProtection(ctx context.Context, owner string, return protection, nil } +// UpdateBranchProtection updates the branch protection for a given branch +func (c *RestClient) UpdateBranchProtection( + ctx context.Context, owner, repo, branch string, preq *github.ProtectionRequest, +) error { + _, _, err := c.client.Repositories.UpdateBranchProtection(ctx, owner, repo, branch, preq) + return err +} + // GetAuthenticatedUser returns the authenticated user func (c *RestClient) GetAuthenticatedUser(ctx context.Context) (*github.User, error) { user, _, err := c.client.Users.Get(ctx, "") diff --git a/internal/providers/github/mock/github.go b/internal/providers/github/mock/github.go index aab9d2a699..ac32db38ea 100644 --- a/internal/providers/github/mock/github.go +++ b/internal/providers/github/mock/github.go @@ -690,3 +690,17 @@ func (mr *MockGitHubMockRecorder) SetCommitStatus(arg0, arg1, arg2, arg3, arg4 i mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCommitStatus", reflect.TypeOf((*MockGitHub)(nil).SetCommitStatus), arg0, arg1, arg2, arg3, arg4) } + +// UpdateBranchProtection mocks base method. +func (m *MockGitHub) UpdateBranchProtection(arg0 context.Context, arg1, arg2, arg3 string, arg4 *github.ProtectionRequest) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateBranchProtection", arg0, arg1, arg2, arg3, arg4) + ret0, _ := ret[0].(error) + return ret0 +} + +// UpdateBranchProtection indicates an expected call of UpdateBranchProtection. +func (mr *MockGitHubMockRecorder) UpdateBranchProtection(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateBranchProtection", reflect.TypeOf((*MockGitHub)(nil).UpdateBranchProtection), arg0, arg1, arg2, arg3, arg4) +} diff --git a/pkg/api/openapi/mediator/v1/mediator.swagger.json b/pkg/api/openapi/mediator/v1/mediator.swagger.json index 9625cefbb5..ff65452042 100644 --- a/pkg/api/openapi/mediator/v1/mediator.swagger.json +++ b/pkg/api/openapi/mediator/v1/mediator.swagger.json @@ -1461,6 +1461,9 @@ }, "rest": { "$ref": "#/definitions/v1RestType" + }, + "ghBranchProtection": { + "$ref": "#/definitions/RemediateGhBranchProtectionType" } } }, @@ -1556,6 +1559,14 @@ }, "description": "Rule defines the individual call of a certain rule type." }, + "RemediateGhBranchProtectionType": { + "type": "object", + "properties": { + "patch": { + "type": "string" + } + } + }, "RestTypeFallback": { "type": "object", "properties": { diff --git a/pkg/api/protobuf/go/mediator/v1/mediator.pb.go b/pkg/api/protobuf/go/mediator/v1/mediator.pb.go index 028ca7fe67..00b50d3c83 100644 --- a/pkg/api/protobuf/go/mediator/v1/mediator.pb.go +++ b/pkg/api/protobuf/go/mediator/v1/mediator.pb.go @@ -7103,8 +7103,9 @@ type RuleType_Definition_Remediate struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Rest *RestType `protobuf:"bytes,2,opt,name=rest,proto3,oneof" json:"rest,omitempty"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Rest *RestType `protobuf:"bytes,2,opt,name=rest,proto3,oneof" json:"rest,omitempty"` + GhBranchProtection *RuleType_Definition_Remediate_GhBranchProtectionType `protobuf:"bytes,3,opt,name=gh_branch_protection,json=ghBranchProtection,proto3,oneof" json:"gh_branch_protection,omitempty"` } func (x *RuleType_Definition_Remediate) Reset() { @@ -7153,6 +7154,13 @@ func (x *RuleType_Definition_Remediate) GetRest() *RestType { return nil } +func (x *RuleType_Definition_Remediate) GetGhBranchProtection() *RuleType_Definition_Remediate_GhBranchProtectionType { + if x != nil { + return x.GhBranchProtection + } + return nil +} + type RuleType_Definition_Alert struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -7435,6 +7443,53 @@ func (x *RuleType_Definition_Eval_JQComparison_Operator) GetDef() string { return "" } +type RuleType_Definition_Remediate_GhBranchProtectionType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Patch string `protobuf:"bytes,1,opt,name=patch,proto3" json:"patch,omitempty"` +} + +func (x *RuleType_Definition_Remediate_GhBranchProtectionType) Reset() { + *x = RuleType_Definition_Remediate_GhBranchProtectionType{} + if protoimpl.UnsafeEnabled { + mi := &file_mediator_v1_mediator_proto_msgTypes[120] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RuleType_Definition_Remediate_GhBranchProtectionType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RuleType_Definition_Remediate_GhBranchProtectionType) ProtoMessage() {} + +func (x *RuleType_Definition_Remediate_GhBranchProtectionType) ProtoReflect() protoreflect.Message { + mi := &file_mediator_v1_mediator_proto_msgTypes[120] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RuleType_Definition_Remediate_GhBranchProtectionType.ProtoReflect.Descriptor instead. +func (*RuleType_Definition_Remediate_GhBranchProtectionType) Descriptor() ([]byte, []int) { + return file_mediator_v1_mediator_proto_rawDescGZIP(), []int{100, 0, 2, 0} +} + +func (x *RuleType_Definition_Remediate_GhBranchProtectionType) GetPatch() string { + if x != nil { + return x.Patch + } + return "" +} + type RuleType_Definition_Alert_AlertTypeSA struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -7446,7 +7501,7 @@ type RuleType_Definition_Alert_AlertTypeSA struct { func (x *RuleType_Definition_Alert_AlertTypeSA) Reset() { *x = RuleType_Definition_Alert_AlertTypeSA{} if protoimpl.UnsafeEnabled { - mi := &file_mediator_v1_mediator_proto_msgTypes[120] + mi := &file_mediator_v1_mediator_proto_msgTypes[121] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7459,7 +7514,7 @@ func (x *RuleType_Definition_Alert_AlertTypeSA) String() string { func (*RuleType_Definition_Alert_AlertTypeSA) ProtoMessage() {} func (x *RuleType_Definition_Alert_AlertTypeSA) ProtoReflect() protoreflect.Message { - mi := &file_mediator_v1_mediator_proto_msgTypes[120] + mi := &file_mediator_v1_mediator_proto_msgTypes[121] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7501,7 +7556,7 @@ type Profile_Rule struct { func (x *Profile_Rule) Reset() { *x = Profile_Rule{} if protoimpl.UnsafeEnabled { - mi := &file_mediator_v1_mediator_proto_msgTypes[121] + mi := &file_mediator_v1_mediator_proto_msgTypes[122] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7514,7 +7569,7 @@ func (x *Profile_Rule) String() string { func (*Profile_Rule) ProtoMessage() {} func (x *Profile_Rule) ProtoReflect() protoreflect.Message { - mi := &file_mediator_v1_mediator_proto_msgTypes[121] + mi := &file_mediator_v1_mediator_proto_msgTypes[122] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8376,7 +8431,7 @@ var file_mediator_v1_mediator_proto_rawDesc = []byte{ 0x0a, 0x09, 0x45, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x64, 0x65, 0x70, 0x66, 0x69, 0x6c, 0x65, 0x22, 0xe2, 0x0e, 0x0a, 0x08, 0x52, 0x75, + 0x52, 0x07, 0x64, 0x65, 0x70, 0x66, 0x69, 0x6c, 0x65, 0x22, 0xa6, 0x10, 0x0a, 0x08, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, @@ -8390,7 +8445,7 @@ var file_mediator_v1_mediator_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x75, 0x69, 0x64, 0x61, 0x6e, 0x63, - 0x65, 0x1a, 0x83, 0x0d, 0x0a, 0x0a, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x65, 0x1a, 0xc7, 0x0e, 0x0a, 0x0a, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x38, 0x0a, 0x0b, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, @@ -8475,394 +8530,406 @@ var file_mediator_v1_mediator_proto_rawDesc = []byte{ 0x52, 0x02, 0x64, 0x62, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x72, 0x65, 0x67, 0x6f, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x76, 0x75, - 0x6c, 0x6e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x1a, 0x58, 0x0a, 0x09, 0x52, 0x65, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x72, 0x65, 0x73, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, - 0x04, 0x72, 0x65, 0x73, 0x74, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x72, 0x65, 0x73, - 0x74, 0x1a, 0xc2, 0x01, 0x0a, 0x05, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x64, 0x0a, 0x11, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x61, 0x64, 0x76, 0x69, - 0x73, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x2e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x6c, 0x65, - 0x72, 0x74, 0x2e, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x53, 0x41, 0x48, 0x00, - 0x52, 0x10, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, - 0x72, 0x79, 0x88, 0x01, 0x01, 0x1a, 0x29, 0x0a, 0x0b, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x53, 0x41, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, - 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x61, 0x64, - 0x76, 0x69, 0x73, 0x6f, 0x72, 0x79, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x22, 0xaf, - 0x04, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, - 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x6c, 0x6e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x1a, 0x9b, 0x02, 0x0a, 0x09, 0x52, 0x65, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x72, 0x65, 0x73, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, + 0x52, 0x04, 0x72, 0x65, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x78, 0x0a, 0x14, 0x67, 0x68, 0x5f, + 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x44, + 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x74, 0x65, 0x2e, 0x47, 0x68, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x48, 0x01, 0x52, 0x12, 0x67, 0x68, + 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x88, 0x01, 0x01, 0x1a, 0x2e, 0x0a, 0x16, 0x47, 0x68, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x50, + 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, + 0x74, 0x63, 0x68, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x42, 0x17, 0x0a, 0x15, + 0x5f, 0x67, 0x68, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xc2, 0x01, 0x0a, 0x05, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x64, 0x0a, 0x11, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, + 0x61, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, + 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x2e, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x53, 0x41, 0x48, 0x00, 0x52, 0x10, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x41, 0x64, + 0x76, 0x69, 0x73, 0x6f, 0x72, 0x79, 0x88, 0x01, 0x01, 0x1a, 0x29, 0x0a, 0x0b, 0x41, 0x6c, 0x65, + 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x53, 0x41, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, + 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x76, 0x65, + 0x72, 0x69, 0x74, 0x79, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x5f, 0x61, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x79, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x42, 0x05, 0x0a, 0x03, 0x5f, + 0x69, 0x64, 0x22, 0xaf, 0x04, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x2e, + 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x13, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x12, 0x46, 0x0a, 0x11, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x65, 0x6e, 0x76, 0x69, + 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x10, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x45, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x61, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x52, 0x75, - 0x6c, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x46, - 0x0a, 0x11, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x64, 0x69, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e, - 0x52, 0x75, 0x6c, 0x65, 0x52, 0x10, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x45, 0x6e, 0x76, 0x69, 0x72, - 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, - 0x63, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x52, - 0x75, 0x6c, 0x65, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x3c, 0x0a, - 0x0c, 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0b, - 0x70, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x72, - 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, - 0x52, 0x09, 0x72, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, - 0x0a, 0x05, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, - 0x05, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x88, 0x01, 0x01, 0x1a, 0x76, 0x0a, 0x04, 0x52, 0x75, 0x6c, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x29, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x03, 0x64, 0x65, - 0x66, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, - 0x2a, 0x7b, 0x0a, 0x0b, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, - 0x1c, 0x0a, 0x18, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1d, 0x0a, - 0x19, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x5f, 0x4f, 0x52, - 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, - 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x5f, 0x50, 0x52, 0x4f, - 0x4a, 0x45, 0x43, 0x54, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, - 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x5a, 0x0a, - 0x0c, 0x44, 0x65, 0x70, 0x45, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x1d, 0x0a, - 0x19, 0x44, 0x45, 0x50, 0x5f, 0x45, 0x43, 0x4f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, - 0x44, 0x45, 0x50, 0x5f, 0x45, 0x43, 0x4f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x4e, 0x50, - 0x4d, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x45, 0x50, 0x5f, 0x45, 0x43, 0x4f, 0x53, 0x59, - 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x47, 0x4f, 0x10, 0x02, 0x2a, 0x88, 0x01, 0x0a, 0x06, 0x45, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, - 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, - 0x49, 0x45, 0x53, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, - 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x56, 0x49, 0x52, 0x4f, 0x4e, 0x4d, 0x45, 0x4e, - 0x54, 0x53, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x41, - 0x52, 0x54, 0x49, 0x46, 0x41, 0x43, 0x54, 0x53, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x45, 0x4e, - 0x54, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x55, 0x4c, 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, - 0x54, 0x53, 0x10, 0x04, 0x32, 0x81, 0x01, 0x0a, 0x0d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0xaa, 0xf8, 0x18, 0x04, 0x08, 0x01, - 0x10, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x32, 0x9c, 0x02, 0x0a, 0x0f, 0x41, 0x72, 0x74, - 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x84, 0x01, 0x0a, - 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x21, - 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0xaa, 0xf8, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, - 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x7d, 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, - 0x61, 0x63, 0x74, 0x42, 0x79, 0x49, 0x64, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, - 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x23, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, - 0x12, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, - 0x63, 0x74, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x32, 0xe8, 0x08, 0x0a, 0x0c, 0x4f, 0x41, 0x75, 0x74, - 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8a, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, - 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x52, 0x4c, - 0x12, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, - 0x52, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x65, 0x64, 0x69, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x20, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, - 0x68, 0x2f, 0x75, 0x72, 0x6c, 0x12, 0x90, 0x01, 0x0a, 0x17, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x4c, - 0x49, 0x12, 0x2b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x6f, 0x72, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x4c, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, - 0x42, 0x6f, 0x64, 0x79, 0x22, 0x32, 0xaa, 0xf8, 0x18, 0x02, 0x08, 0x01, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x26, 0x12, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, - 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x63, 0x6c, 0x69, 0x12, 0xa8, 0x01, 0x0a, 0x17, 0x45, 0x78, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x57, 0x45, 0x42, 0x12, 0x2b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x46, - 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x45, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x6f, 0x72, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x45, 0x42, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x32, 0xaa, 0xf8, 0x18, 0x02, 0x08, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x61, 0x6c, 0x6c, - 0x62, 0x61, 0x63, 0x6b, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, - 0x77, 0x65, 0x62, 0x12, 0x95, 0x01, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0xaa, 0xf8, 0x18, - 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x8c, 0x01, 0x0a, 0x11, - 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4f, 0x61, 0x75, - 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x28, 0xaa, 0xf8, 0x18, 0x02, 0x20, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, - 0x2a, 0x22, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, - 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x2d, 0x61, 0x6c, 0x6c, 0x12, 0xb4, 0x01, 0x0a, 0x17, 0x52, - 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4f, 0x61, 0x75, 0x74, 0x68, - 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x3e, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x30, 0x3a, 0x01, 0x2a, 0x22, 0x2b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x72, 0x65, - 0x76, 0x6f, 0x6b, 0x65, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, - 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x17, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x2b, 0x2e, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x46, - 0x72, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x72, 0x6f, 0x6d, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, - 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2f, 0x7b, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x7d, 0x32, 0xf9, 0x06, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, - 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa9, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, - 0x26, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x42, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, - 0x3a, 0x01, 0x2a, 0x22, 0x2f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x72, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x65, 0x72, 0x12, 0xd6, 0x01, 0x0a, 0x22, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6d, - 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x46, - 0x72, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x36, 0x2e, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, - 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0xaa, 0xf8, - 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, - 0x65, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x12, 0x97, 0x01, - 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, - 0x65, 0x73, 0x12, 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x36, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x49, 0x64, 0x12, 0x25, 0x2e, + 0x6c, 0x65, 0x52, 0x0b, 0x70, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x21, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x01, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x02, 0x52, 0x05, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x88, 0x01, 0x01, 0x1a, 0x76, 0x0a, + 0x04, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x29, 0x0a, 0x03, 0x64, 0x65, + 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x52, 0x03, 0x64, 0x65, 0x66, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x42, 0x0c, 0x0a, 0x0a, + 0x5f, 0x72, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x61, + 0x6c, 0x65, 0x72, 0x74, 0x2a, 0x7b, 0x0a, 0x0b, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x77, + 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x18, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4f, 0x57, + 0x4e, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4f, 0x57, 0x4e, 0x45, + 0x52, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, + 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, + 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x4f, 0x42, + 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, + 0x03, 0x2a, 0x5a, 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x45, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x45, 0x50, 0x5f, 0x45, 0x43, 0x4f, 0x53, 0x59, 0x53, 0x54, + 0x45, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x15, 0x0a, 0x11, 0x44, 0x45, 0x50, 0x5f, 0x45, 0x43, 0x4f, 0x53, 0x59, 0x53, 0x54, 0x45, + 0x4d, 0x5f, 0x4e, 0x50, 0x4d, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x45, 0x50, 0x5f, 0x45, + 0x43, 0x4f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x47, 0x4f, 0x10, 0x02, 0x2a, 0x88, 0x01, + 0x0a, 0x06, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x4e, 0x54, 0x49, + 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x17, 0x0a, 0x13, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, + 0x49, 0x54, 0x4f, 0x52, 0x49, 0x45, 0x53, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x45, 0x4e, 0x54, + 0x49, 0x54, 0x59, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x56, 0x49, 0x52, 0x4f, + 0x4e, 0x4d, 0x45, 0x4e, 0x54, 0x53, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x4e, 0x54, 0x49, + 0x54, 0x59, 0x5f, 0x41, 0x52, 0x54, 0x49, 0x46, 0x41, 0x43, 0x54, 0x53, 0x10, 0x03, 0x12, 0x18, + 0x0a, 0x14, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x55, 0x4c, 0x4c, 0x5f, 0x52, 0x45, + 0x51, 0x55, 0x45, 0x53, 0x54, 0x53, 0x10, 0x04, 0x32, 0x81, 0x01, 0x0a, 0x0d, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x0b, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x64, + 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0xaa, 0xf8, + 0x18, 0x04, 0x08, 0x01, 0x10, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x32, 0x9c, 0x02, 0x0a, + 0x0f, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x84, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x73, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0xaa, 0xf8, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x42, 0x79, 0x49, 0x64, 0x12, 0x23, 0x2e, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x32, 0xe8, 0x08, 0x0a, 0x0c, + 0x4f, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8a, 0x01, 0x0a, + 0x13, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x55, 0x52, 0x4c, 0x12, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x52, 0x4c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, + 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x75, 0x72, 0x6c, 0x12, 0x90, 0x01, 0x0a, 0x17, 0x45, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x6f, 0x72, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x43, 0x4c, 0x49, 0x12, 0x2b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, + 0x46, 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x4c, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x32, 0xaa, 0xf8, 0x18, 0x02, 0x08, 0x01, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x2f, 0x7b, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x63, 0x6c, 0x69, 0x12, 0xa8, 0x01, 0x0a, + 0x17, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x6f, 0x72, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x45, 0x42, 0x12, 0x2b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, + 0x6f, 0x64, 0x65, 0x46, 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x45, 0x42, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, + 0x46, 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x45, 0x42, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x32, 0xaa, 0xf8, 0x18, 0x02, 0x08, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x26, 0x12, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, + 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x7d, 0x2f, 0x77, 0x65, 0x62, 0x12, 0x95, 0x01, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x26, + 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, + 0x72, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x2e, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, + 0x22, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x7b, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x8c, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, + 0x65, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0xaa, 0xf8, 0x18, 0x02, 0x20, 0x01, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x2f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x2d, 0x61, 0x6c, 0x6c, 0x12, 0xb4, + 0x01, 0x0a, 0x17, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2b, 0x2e, 0x6d, 0x65, 0x64, + 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4f, + 0x61, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4f, 0x61, 0x75, 0x74, + 0x68, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a, 0x22, 0x2b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x7d, 0x2f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x17, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x72, 0x6f, + 0x6d, 0x12, 0x2b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, + 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0xaa, 0xf8, + 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2f, + 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x7b, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x7d, 0x32, 0xf9, 0x06, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa9, 0x01, 0x0a, + 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x34, 0x3a, 0x01, 0x2a, 0x22, 0x2f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0xd6, 0x01, 0x0a, 0x22, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x69, 0x65, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, + 0x36, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x69, 0x65, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x46, 0x72, 0x6f, 0x6d, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x3f, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, + 0x12, 0x2f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, + 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x74, + 0x65, 0x12, 0x97, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x36, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x2a, 0x12, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x11, + 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x49, + 0x64, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x49, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x33, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x2f, 0x69, 0x64, 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xaa, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0xaa, 0xf8, - 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x69, - 0x64, 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, - 0x7d, 0x12, 0xaa, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, - 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0xaa, 0xf8, - 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x7d, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x32, 0xa6, - 0x01, 0x0a, 0x17, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8a, 0x01, 0x0a, 0x13, 0x47, - 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, - 0x6e, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x70, 0x72, 0x6f, - 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xcc, 0x02, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6e, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x01, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x3a, 0x01, 0x2a, 0x22, 0x0c, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x12, 0x6b, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x01, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x2a, 0x0c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, - 0x75, 0x73, 0x65, 0x72, 0x12, 0x60, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, - 0x1b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0xaa, 0xf8, 0x18, 0x02, - 0x28, 0x03, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x32, 0xd8, 0x0c, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7a, 0x0a, 0x0d, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x40, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x7d, 0x32, 0xa6, 0x01, 0x0a, 0x17, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x50, 0x72, 0x6f, + 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8a, + 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x50, 0x72, + 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x28, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1a, 0x12, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, + 0x68, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xcc, 0x02, 0x0a, 0x0b, + 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6e, 0x0a, 0x0a, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0xaa, 0xf8, 0x18, 0x04, + 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x3a, 0x01, 0x2a, 0x22, 0x0c, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x12, 0x6b, 0x0a, 0x0a, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0xaa, 0xf8, 0x18, 0x04, + 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x2a, 0x0c, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x12, 0x60, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1c, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, + 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x03, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x32, 0xd8, 0x0c, 0x0a, 0x0e, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7a, 0x0a, + 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x21, + 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x7c, 0x0a, 0x0d, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x64, + 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x22, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x7c, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0xaa, - 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x2a, 0x14, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x7b, - 0x69, 0x64, 0x7d, 0x12, 0x73, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, - 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x77, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x64, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, + 0x65, 0x22, 0x24, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x16, 0x2a, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x73, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0xaa, 0xf8, + 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x77, 0x0a, 0x0e, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x64, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x7b, 0x69, 0x64, - 0x7d, 0x12, 0xa3, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x2e, 0x6d, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, + 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xa3, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x2a, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0xaa, 0xf8, 0x18, 0x02, 0x28, + 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x19, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2d, 0x2e, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, - 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x50, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2d, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x78, 0x0a, 0x0d, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, - 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, - 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x20, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, - 0x12, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0xaa, 0xf8, 0x18, 0x02, 0x28, - 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x82, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x75, - 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, 0x49, 0x64, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6c, - 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x7f, 0x0a, 0x0e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x2e, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x78, + 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, + 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, + 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, + 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, + 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0xaa, + 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6e, + 0x61, 0x6d, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x82, 0x01, 0x0a, 0x0f, 0x47, + 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, 0x49, 0x64, 0x12, 0x23, + 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, 0x49, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0xaa, 0xf8, 0x18, 0x02, 0x28, + 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, + 0x7f, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x7f, 0x0a, 0x0e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, - 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0xaa, 0xf8, 0x18, 0x04, + 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x7f, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, - 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x1a, 0x11, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x81, 0x01, - 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0xaa, 0xf8, 0x18, + 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x1a, 0x11, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x81, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0xaa, 0xf8, 0x18, 0x04, 0x18, - 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x7b, 0x69, 0x64, - 0x7d, 0x32, 0xee, 0x01, 0x0a, 0x0a, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x68, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, - 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x12, 0x76, 0x0a, 0x0d, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x69, 0x72, 0x12, 0x21, 0x2e, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x4b, 0x65, 0x79, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, - 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x1e, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x10, 0x3a, 0x01, 0x2a, 0x22, 0x0b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6b, - 0x65, 0x79, 0x3a, 0x5a, 0x0a, 0x0b, 0x72, 0x70, 0x63, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x85, 0x8f, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x65, 0x64, 0x69, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x70, 0x63, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x0a, 0x72, 0x70, 0x63, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x32, - 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x61, - 0x63, 0x6b, 0x6c, 0x6f, 0x6b, 0x2f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x70, - 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x67, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0xaa, + 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x32, 0xee, 0x01, 0x0a, 0x0a, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x0d, 0x12, 0x0b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x12, 0x76, + 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x69, 0x72, 0x12, + 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x3a, 0x01, 0x2a, 0x22, 0x0b, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x3a, 0x5a, 0x0a, 0x0b, 0x72, 0x70, 0x63, 0x5f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x85, 0x8f, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x70, 0x63, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x72, 0x70, 0x63, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x6c, 0x6f, 0x6b, 0x2f, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x6f, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x67, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -8878,158 +8945,159 @@ func file_mediator_v1_mediator_proto_rawDescGZIP() []byte { } var file_mediator_v1_mediator_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_mediator_v1_mediator_proto_msgTypes = make([]protoimpl.MessageInfo, 122) +var file_mediator_v1_mediator_proto_msgTypes = make([]protoimpl.MessageInfo, 123) var file_mediator_v1_mediator_proto_goTypes = []interface{}{ - (ObjectOwner)(0), // 0: mediator.v1.ObjectOwner - (DepEcosystem)(0), // 1: mediator.v1.DepEcosystem - (Entity)(0), // 2: mediator.v1.Entity - (*RpcOptions)(nil), // 3: mediator.v1.RpcOptions - (*ListArtifactsRequest)(nil), // 4: mediator.v1.ListArtifactsRequest - (*ListArtifactsResponse)(nil), // 5: mediator.v1.ListArtifactsResponse - (*Artifact)(nil), // 6: mediator.v1.Artifact - (*GithubWorkflow)(nil), // 7: mediator.v1.GithubWorkflow - (*SignatureVerification)(nil), // 8: mediator.v1.SignatureVerification - (*ArtifactVersion)(nil), // 9: mediator.v1.ArtifactVersion - (*GetArtifactByIdRequest)(nil), // 10: mediator.v1.GetArtifactByIdRequest - (*GetArtifactByIdResponse)(nil), // 11: mediator.v1.GetArtifactByIdResponse - (*PullRequest)(nil), // 12: mediator.v1.PullRequest - (*Dependency)(nil), // 13: mediator.v1.Dependency - (*PrDependencies)(nil), // 14: mediator.v1.PrDependencies - (*CheckHealthRequest)(nil), // 15: mediator.v1.CheckHealthRequest - (*CheckHealthResponse)(nil), // 16: mediator.v1.CheckHealthResponse - (*GetAuthorizationURLRequest)(nil), // 17: mediator.v1.GetAuthorizationURLRequest - (*GetAuthorizationURLResponse)(nil), // 18: mediator.v1.GetAuthorizationURLResponse - (*ExchangeCodeForTokenCLIRequest)(nil), // 19: mediator.v1.ExchangeCodeForTokenCLIRequest - (*StoreProviderTokenRequest)(nil), // 20: mediator.v1.StoreProviderTokenRequest - (*StoreProviderTokenResponse)(nil), // 21: mediator.v1.StoreProviderTokenResponse - (*ExchangeCodeForTokenWEBRequest)(nil), // 22: mediator.v1.ExchangeCodeForTokenWEBRequest - (*ExchangeCodeForTokenWEBResponse)(nil), // 23: mediator.v1.ExchangeCodeForTokenWEBResponse - (*RevokeOauthTokensRequest)(nil), // 24: mediator.v1.RevokeOauthTokensRequest - (*RevokeOauthTokensResponse)(nil), // 25: mediator.v1.RevokeOauthTokensResponse - (*RevokeOauthProjectTokenRequest)(nil), // 26: mediator.v1.RevokeOauthProjectTokenRequest - (*RevokeOauthProjectTokenResponse)(nil), // 27: mediator.v1.RevokeOauthProjectTokenResponse - (*RefreshTokenRequest)(nil), // 28: mediator.v1.RefreshTokenRequest - (*RefreshTokenResponse)(nil), // 29: mediator.v1.RefreshTokenResponse - (*Project)(nil), // 30: mediator.v1.Project - (*ListRemoteRepositoriesFromProviderRequest)(nil), // 31: mediator.v1.ListRemoteRepositoriesFromProviderRequest - (*ListRemoteRepositoriesFromProviderResponse)(nil), // 32: mediator.v1.ListRemoteRepositoriesFromProviderResponse - (*UpstreamRepositoryRef)(nil), // 33: mediator.v1.UpstreamRepositoryRef - (*Repository)(nil), // 34: mediator.v1.Repository - (*RegisterRepositoryRequest)(nil), // 35: mediator.v1.RegisterRepositoryRequest - (*RegisterRepoResult)(nil), // 36: mediator.v1.RegisterRepoResult - (*RegisterRepositoryResponse)(nil), // 37: mediator.v1.RegisterRepositoryResponse - (*GetRepositoryByIdRequest)(nil), // 38: mediator.v1.GetRepositoryByIdRequest - (*GetRepositoryByIdResponse)(nil), // 39: mediator.v1.GetRepositoryByIdResponse - (*GetRepositoryByNameRequest)(nil), // 40: mediator.v1.GetRepositoryByNameRequest - (*GetRepositoryByNameResponse)(nil), // 41: mediator.v1.GetRepositoryByNameResponse - (*ListRepositoriesRequest)(nil), // 42: mediator.v1.ListRepositoriesRequest - (*ListRepositoriesResponse)(nil), // 43: mediator.v1.ListRepositoriesResponse - (*VerifyProviderTokenFromRequest)(nil), // 44: mediator.v1.VerifyProviderTokenFromRequest - (*VerifyProviderTokenFromResponse)(nil), // 45: mediator.v1.VerifyProviderTokenFromResponse - (*GetVulnerabilitiesRequest)(nil), // 46: mediator.v1.GetVulnerabilitiesRequest - (*GetVulnerabilityByIdRequest)(nil), // 47: mediator.v1.GetVulnerabilityByIdRequest - (*GetVulnerabilityByIdResponse)(nil), // 48: mediator.v1.GetVulnerabilityByIdResponse - (*GetVulnerabilitiesResponse)(nil), // 49: mediator.v1.GetVulnerabilitiesResponse - (*GetSecretsRequest)(nil), // 50: mediator.v1.GetSecretsRequest - (*GetSecretsResponse)(nil), // 51: mediator.v1.GetSecretsResponse - (*GetSecretByIdRequest)(nil), // 52: mediator.v1.GetSecretByIdRequest - (*GetSecretByIdResponse)(nil), // 53: mediator.v1.GetSecretByIdResponse - (*GetBranchProtectionRequest)(nil), // 54: mediator.v1.GetBranchProtectionRequest - (*BranchProtection)(nil), // 55: mediator.v1.BranchProtection - (*GetBranchProtectionResponse)(nil), // 56: mediator.v1.GetBranchProtectionResponse - (*CreateUserRequest)(nil), // 57: mediator.v1.CreateUserRequest - (*CreateUserResponse)(nil), // 58: mediator.v1.CreateUserResponse - (*DeleteUserRequest)(nil), // 59: mediator.v1.DeleteUserRequest - (*DeleteUserResponse)(nil), // 60: mediator.v1.DeleteUserResponse - (*UserRecord)(nil), // 61: mediator.v1.UserRecord - (*GetUserRequest)(nil), // 62: mediator.v1.GetUserRequest - (*GetUserResponse)(nil), // 63: mediator.v1.GetUserResponse - (*CreateProfileRequest)(nil), // 64: mediator.v1.CreateProfileRequest - (*CreateProfileResponse)(nil), // 65: mediator.v1.CreateProfileResponse - (*DeleteProfileRequest)(nil), // 66: mediator.v1.DeleteProfileRequest - (*DeleteProfileResponse)(nil), // 67: mediator.v1.DeleteProfileResponse - (*ListProfilesRequest)(nil), // 68: mediator.v1.ListProfilesRequest - (*ListProfilesResponse)(nil), // 69: mediator.v1.ListProfilesResponse - (*GetProfileByIdRequest)(nil), // 70: mediator.v1.GetProfileByIdRequest - (*GetProfileByIdResponse)(nil), // 71: mediator.v1.GetProfileByIdResponse - (*ProfileStatus)(nil), // 72: mediator.v1.ProfileStatus - (*RuleEvaluationStatus)(nil), // 73: mediator.v1.RuleEvaluationStatus - (*GetProfileStatusByNameRequest)(nil), // 74: mediator.v1.GetProfileStatusByNameRequest - (*GetProfileStatusByNameResponse)(nil), // 75: mediator.v1.GetProfileStatusByNameResponse - (*GetProfileStatusByProjectRequest)(nil), // 76: mediator.v1.GetProfileStatusByProjectRequest - (*GetProfileStatusByProjectResponse)(nil), // 77: mediator.v1.GetProfileStatusByProjectResponse - (*GetPublicKeyRequest)(nil), // 78: mediator.v1.GetPublicKeyRequest - (*GetPublicKeyResponse)(nil), // 79: mediator.v1.GetPublicKeyResponse - (*CreateKeyPairRequest)(nil), // 80: mediator.v1.CreateKeyPairRequest - (*CreateKeyPairResponse)(nil), // 81: mediator.v1.CreateKeyPairResponse - (*RESTProviderConfig)(nil), // 82: mediator.v1.RESTProviderConfig - (*GitHubProviderConfig)(nil), // 83: mediator.v1.GitHubProviderConfig - (*Provider)(nil), // 84: mediator.v1.Provider - (*Context)(nil), // 85: mediator.v1.Context - (*ListRuleTypesRequest)(nil), // 86: mediator.v1.ListRuleTypesRequest - (*ListRuleTypesResponse)(nil), // 87: mediator.v1.ListRuleTypesResponse - (*GetRuleTypeByNameRequest)(nil), // 88: mediator.v1.GetRuleTypeByNameRequest - (*GetRuleTypeByNameResponse)(nil), // 89: mediator.v1.GetRuleTypeByNameResponse - (*GetRuleTypeByIdRequest)(nil), // 90: mediator.v1.GetRuleTypeByIdRequest - (*GetRuleTypeByIdResponse)(nil), // 91: mediator.v1.GetRuleTypeByIdResponse - (*CreateRuleTypeRequest)(nil), // 92: mediator.v1.CreateRuleTypeRequest - (*CreateRuleTypeResponse)(nil), // 93: mediator.v1.CreateRuleTypeResponse - (*UpdateRuleTypeRequest)(nil), // 94: mediator.v1.UpdateRuleTypeRequest - (*UpdateRuleTypeResponse)(nil), // 95: mediator.v1.UpdateRuleTypeResponse - (*DeleteRuleTypeRequest)(nil), // 96: mediator.v1.DeleteRuleTypeRequest - (*DeleteRuleTypeResponse)(nil), // 97: mediator.v1.DeleteRuleTypeResponse - (*RestType)(nil), // 98: mediator.v1.RestType - (*BuiltinType)(nil), // 99: mediator.v1.BuiltinType - (*ArtifactType)(nil), // 100: mediator.v1.ArtifactType - (*GitType)(nil), // 101: mediator.v1.GitType - (*DiffType)(nil), // 102: mediator.v1.DiffType - (*RuleType)(nil), // 103: mediator.v1.RuleType - (*Profile)(nil), // 104: mediator.v1.Profile - (*PrDependencies_ContextualDependency)(nil), // 105: mediator.v1.PrDependencies.ContextualDependency - (*PrDependencies_ContextualDependency_FilePatch)(nil), // 106: mediator.v1.PrDependencies.ContextualDependency.FilePatch - (*RegisterRepoResult_Status)(nil), // 107: mediator.v1.RegisterRepoResult.Status - nil, // 108: mediator.v1.RuleEvaluationStatus.EntityInfoEntry - (*GetProfileStatusByNameRequest_EntityTypedId)(nil), // 109: mediator.v1.GetProfileStatusByNameRequest.EntityTypedId - (*Provider_Context)(nil), // 110: mediator.v1.Provider.Context - (*Provider_Definition)(nil), // 111: mediator.v1.Provider.Definition - (*RestType_Fallback)(nil), // 112: mediator.v1.RestType.Fallback - (*DiffType_Ecosystem)(nil), // 113: mediator.v1.DiffType.Ecosystem - (*RuleType_Definition)(nil), // 114: mediator.v1.RuleType.Definition - (*RuleType_Definition_Ingest)(nil), // 115: mediator.v1.RuleType.Definition.Ingest - (*RuleType_Definition_Eval)(nil), // 116: mediator.v1.RuleType.Definition.Eval - (*RuleType_Definition_Remediate)(nil), // 117: mediator.v1.RuleType.Definition.Remediate - (*RuleType_Definition_Alert)(nil), // 118: mediator.v1.RuleType.Definition.Alert - (*RuleType_Definition_Eval_JQComparison)(nil), // 119: mediator.v1.RuleType.Definition.Eval.JQComparison - (*RuleType_Definition_Eval_Rego)(nil), // 120: mediator.v1.RuleType.Definition.Eval.Rego - (*RuleType_Definition_Eval_Vulncheck)(nil), // 121: mediator.v1.RuleType.Definition.Eval.Vulncheck - (*RuleType_Definition_Eval_JQComparison_Operator)(nil), // 122: mediator.v1.RuleType.Definition.Eval.JQComparison.Operator - (*RuleType_Definition_Alert_AlertTypeSA)(nil), // 123: mediator.v1.RuleType.Definition.Alert.AlertTypeSA - (*Profile_Rule)(nil), // 124: mediator.v1.Profile.Rule - (*timestamppb.Timestamp)(nil), // 125: google.protobuf.Timestamp - (*structpb.Struct)(nil), // 126: google.protobuf.Struct - (*descriptorpb.MethodOptions)(nil), // 127: google.protobuf.MethodOptions - (*httpbody.HttpBody)(nil), // 128: google.api.HttpBody + (ObjectOwner)(0), // 0: mediator.v1.ObjectOwner + (DepEcosystem)(0), // 1: mediator.v1.DepEcosystem + (Entity)(0), // 2: mediator.v1.Entity + (*RpcOptions)(nil), // 3: mediator.v1.RpcOptions + (*ListArtifactsRequest)(nil), // 4: mediator.v1.ListArtifactsRequest + (*ListArtifactsResponse)(nil), // 5: mediator.v1.ListArtifactsResponse + (*Artifact)(nil), // 6: mediator.v1.Artifact + (*GithubWorkflow)(nil), // 7: mediator.v1.GithubWorkflow + (*SignatureVerification)(nil), // 8: mediator.v1.SignatureVerification + (*ArtifactVersion)(nil), // 9: mediator.v1.ArtifactVersion + (*GetArtifactByIdRequest)(nil), // 10: mediator.v1.GetArtifactByIdRequest + (*GetArtifactByIdResponse)(nil), // 11: mediator.v1.GetArtifactByIdResponse + (*PullRequest)(nil), // 12: mediator.v1.PullRequest + (*Dependency)(nil), // 13: mediator.v1.Dependency + (*PrDependencies)(nil), // 14: mediator.v1.PrDependencies + (*CheckHealthRequest)(nil), // 15: mediator.v1.CheckHealthRequest + (*CheckHealthResponse)(nil), // 16: mediator.v1.CheckHealthResponse + (*GetAuthorizationURLRequest)(nil), // 17: mediator.v1.GetAuthorizationURLRequest + (*GetAuthorizationURLResponse)(nil), // 18: mediator.v1.GetAuthorizationURLResponse + (*ExchangeCodeForTokenCLIRequest)(nil), // 19: mediator.v1.ExchangeCodeForTokenCLIRequest + (*StoreProviderTokenRequest)(nil), // 20: mediator.v1.StoreProviderTokenRequest + (*StoreProviderTokenResponse)(nil), // 21: mediator.v1.StoreProviderTokenResponse + (*ExchangeCodeForTokenWEBRequest)(nil), // 22: mediator.v1.ExchangeCodeForTokenWEBRequest + (*ExchangeCodeForTokenWEBResponse)(nil), // 23: mediator.v1.ExchangeCodeForTokenWEBResponse + (*RevokeOauthTokensRequest)(nil), // 24: mediator.v1.RevokeOauthTokensRequest + (*RevokeOauthTokensResponse)(nil), // 25: mediator.v1.RevokeOauthTokensResponse + (*RevokeOauthProjectTokenRequest)(nil), // 26: mediator.v1.RevokeOauthProjectTokenRequest + (*RevokeOauthProjectTokenResponse)(nil), // 27: mediator.v1.RevokeOauthProjectTokenResponse + (*RefreshTokenRequest)(nil), // 28: mediator.v1.RefreshTokenRequest + (*RefreshTokenResponse)(nil), // 29: mediator.v1.RefreshTokenResponse + (*Project)(nil), // 30: mediator.v1.Project + (*ListRemoteRepositoriesFromProviderRequest)(nil), // 31: mediator.v1.ListRemoteRepositoriesFromProviderRequest + (*ListRemoteRepositoriesFromProviderResponse)(nil), // 32: mediator.v1.ListRemoteRepositoriesFromProviderResponse + (*UpstreamRepositoryRef)(nil), // 33: mediator.v1.UpstreamRepositoryRef + (*Repository)(nil), // 34: mediator.v1.Repository + (*RegisterRepositoryRequest)(nil), // 35: mediator.v1.RegisterRepositoryRequest + (*RegisterRepoResult)(nil), // 36: mediator.v1.RegisterRepoResult + (*RegisterRepositoryResponse)(nil), // 37: mediator.v1.RegisterRepositoryResponse + (*GetRepositoryByIdRequest)(nil), // 38: mediator.v1.GetRepositoryByIdRequest + (*GetRepositoryByIdResponse)(nil), // 39: mediator.v1.GetRepositoryByIdResponse + (*GetRepositoryByNameRequest)(nil), // 40: mediator.v1.GetRepositoryByNameRequest + (*GetRepositoryByNameResponse)(nil), // 41: mediator.v1.GetRepositoryByNameResponse + (*ListRepositoriesRequest)(nil), // 42: mediator.v1.ListRepositoriesRequest + (*ListRepositoriesResponse)(nil), // 43: mediator.v1.ListRepositoriesResponse + (*VerifyProviderTokenFromRequest)(nil), // 44: mediator.v1.VerifyProviderTokenFromRequest + (*VerifyProviderTokenFromResponse)(nil), // 45: mediator.v1.VerifyProviderTokenFromResponse + (*GetVulnerabilitiesRequest)(nil), // 46: mediator.v1.GetVulnerabilitiesRequest + (*GetVulnerabilityByIdRequest)(nil), // 47: mediator.v1.GetVulnerabilityByIdRequest + (*GetVulnerabilityByIdResponse)(nil), // 48: mediator.v1.GetVulnerabilityByIdResponse + (*GetVulnerabilitiesResponse)(nil), // 49: mediator.v1.GetVulnerabilitiesResponse + (*GetSecretsRequest)(nil), // 50: mediator.v1.GetSecretsRequest + (*GetSecretsResponse)(nil), // 51: mediator.v1.GetSecretsResponse + (*GetSecretByIdRequest)(nil), // 52: mediator.v1.GetSecretByIdRequest + (*GetSecretByIdResponse)(nil), // 53: mediator.v1.GetSecretByIdResponse + (*GetBranchProtectionRequest)(nil), // 54: mediator.v1.GetBranchProtectionRequest + (*BranchProtection)(nil), // 55: mediator.v1.BranchProtection + (*GetBranchProtectionResponse)(nil), // 56: mediator.v1.GetBranchProtectionResponse + (*CreateUserRequest)(nil), // 57: mediator.v1.CreateUserRequest + (*CreateUserResponse)(nil), // 58: mediator.v1.CreateUserResponse + (*DeleteUserRequest)(nil), // 59: mediator.v1.DeleteUserRequest + (*DeleteUserResponse)(nil), // 60: mediator.v1.DeleteUserResponse + (*UserRecord)(nil), // 61: mediator.v1.UserRecord + (*GetUserRequest)(nil), // 62: mediator.v1.GetUserRequest + (*GetUserResponse)(nil), // 63: mediator.v1.GetUserResponse + (*CreateProfileRequest)(nil), // 64: mediator.v1.CreateProfileRequest + (*CreateProfileResponse)(nil), // 65: mediator.v1.CreateProfileResponse + (*DeleteProfileRequest)(nil), // 66: mediator.v1.DeleteProfileRequest + (*DeleteProfileResponse)(nil), // 67: mediator.v1.DeleteProfileResponse + (*ListProfilesRequest)(nil), // 68: mediator.v1.ListProfilesRequest + (*ListProfilesResponse)(nil), // 69: mediator.v1.ListProfilesResponse + (*GetProfileByIdRequest)(nil), // 70: mediator.v1.GetProfileByIdRequest + (*GetProfileByIdResponse)(nil), // 71: mediator.v1.GetProfileByIdResponse + (*ProfileStatus)(nil), // 72: mediator.v1.ProfileStatus + (*RuleEvaluationStatus)(nil), // 73: mediator.v1.RuleEvaluationStatus + (*GetProfileStatusByNameRequest)(nil), // 74: mediator.v1.GetProfileStatusByNameRequest + (*GetProfileStatusByNameResponse)(nil), // 75: mediator.v1.GetProfileStatusByNameResponse + (*GetProfileStatusByProjectRequest)(nil), // 76: mediator.v1.GetProfileStatusByProjectRequest + (*GetProfileStatusByProjectResponse)(nil), // 77: mediator.v1.GetProfileStatusByProjectResponse + (*GetPublicKeyRequest)(nil), // 78: mediator.v1.GetPublicKeyRequest + (*GetPublicKeyResponse)(nil), // 79: mediator.v1.GetPublicKeyResponse + (*CreateKeyPairRequest)(nil), // 80: mediator.v1.CreateKeyPairRequest + (*CreateKeyPairResponse)(nil), // 81: mediator.v1.CreateKeyPairResponse + (*RESTProviderConfig)(nil), // 82: mediator.v1.RESTProviderConfig + (*GitHubProviderConfig)(nil), // 83: mediator.v1.GitHubProviderConfig + (*Provider)(nil), // 84: mediator.v1.Provider + (*Context)(nil), // 85: mediator.v1.Context + (*ListRuleTypesRequest)(nil), // 86: mediator.v1.ListRuleTypesRequest + (*ListRuleTypesResponse)(nil), // 87: mediator.v1.ListRuleTypesResponse + (*GetRuleTypeByNameRequest)(nil), // 88: mediator.v1.GetRuleTypeByNameRequest + (*GetRuleTypeByNameResponse)(nil), // 89: mediator.v1.GetRuleTypeByNameResponse + (*GetRuleTypeByIdRequest)(nil), // 90: mediator.v1.GetRuleTypeByIdRequest + (*GetRuleTypeByIdResponse)(nil), // 91: mediator.v1.GetRuleTypeByIdResponse + (*CreateRuleTypeRequest)(nil), // 92: mediator.v1.CreateRuleTypeRequest + (*CreateRuleTypeResponse)(nil), // 93: mediator.v1.CreateRuleTypeResponse + (*UpdateRuleTypeRequest)(nil), // 94: mediator.v1.UpdateRuleTypeRequest + (*UpdateRuleTypeResponse)(nil), // 95: mediator.v1.UpdateRuleTypeResponse + (*DeleteRuleTypeRequest)(nil), // 96: mediator.v1.DeleteRuleTypeRequest + (*DeleteRuleTypeResponse)(nil), // 97: mediator.v1.DeleteRuleTypeResponse + (*RestType)(nil), // 98: mediator.v1.RestType + (*BuiltinType)(nil), // 99: mediator.v1.BuiltinType + (*ArtifactType)(nil), // 100: mediator.v1.ArtifactType + (*GitType)(nil), // 101: mediator.v1.GitType + (*DiffType)(nil), // 102: mediator.v1.DiffType + (*RuleType)(nil), // 103: mediator.v1.RuleType + (*Profile)(nil), // 104: mediator.v1.Profile + (*PrDependencies_ContextualDependency)(nil), // 105: mediator.v1.PrDependencies.ContextualDependency + (*PrDependencies_ContextualDependency_FilePatch)(nil), // 106: mediator.v1.PrDependencies.ContextualDependency.FilePatch + (*RegisterRepoResult_Status)(nil), // 107: mediator.v1.RegisterRepoResult.Status + nil, // 108: mediator.v1.RuleEvaluationStatus.EntityInfoEntry + (*GetProfileStatusByNameRequest_EntityTypedId)(nil), // 109: mediator.v1.GetProfileStatusByNameRequest.EntityTypedId + (*Provider_Context)(nil), // 110: mediator.v1.Provider.Context + (*Provider_Definition)(nil), // 111: mediator.v1.Provider.Definition + (*RestType_Fallback)(nil), // 112: mediator.v1.RestType.Fallback + (*DiffType_Ecosystem)(nil), // 113: mediator.v1.DiffType.Ecosystem + (*RuleType_Definition)(nil), // 114: mediator.v1.RuleType.Definition + (*RuleType_Definition_Ingest)(nil), // 115: mediator.v1.RuleType.Definition.Ingest + (*RuleType_Definition_Eval)(nil), // 116: mediator.v1.RuleType.Definition.Eval + (*RuleType_Definition_Remediate)(nil), // 117: mediator.v1.RuleType.Definition.Remediate + (*RuleType_Definition_Alert)(nil), // 118: mediator.v1.RuleType.Definition.Alert + (*RuleType_Definition_Eval_JQComparison)(nil), // 119: mediator.v1.RuleType.Definition.Eval.JQComparison + (*RuleType_Definition_Eval_Rego)(nil), // 120: mediator.v1.RuleType.Definition.Eval.Rego + (*RuleType_Definition_Eval_Vulncheck)(nil), // 121: mediator.v1.RuleType.Definition.Eval.Vulncheck + (*RuleType_Definition_Eval_JQComparison_Operator)(nil), // 122: mediator.v1.RuleType.Definition.Eval.JQComparison.Operator + (*RuleType_Definition_Remediate_GhBranchProtectionType)(nil), // 123: mediator.v1.RuleType.Definition.Remediate.GhBranchProtectionType + (*RuleType_Definition_Alert_AlertTypeSA)(nil), // 124: mediator.v1.RuleType.Definition.Alert.AlertTypeSA + (*Profile_Rule)(nil), // 125: mediator.v1.Profile.Rule + (*timestamppb.Timestamp)(nil), // 126: google.protobuf.Timestamp + (*structpb.Struct)(nil), // 127: google.protobuf.Struct + (*descriptorpb.MethodOptions)(nil), // 128: google.protobuf.MethodOptions + (*httpbody.HttpBody)(nil), // 129: google.api.HttpBody } var file_mediator_v1_mediator_proto_depIdxs = []int32{ 0, // 0: mediator.v1.RpcOptions.auth_scope:type_name -> mediator.v1.ObjectOwner 6, // 1: mediator.v1.ListArtifactsResponse.results:type_name -> mediator.v1.Artifact 9, // 2: mediator.v1.Artifact.versions:type_name -> mediator.v1.ArtifactVersion - 125, // 3: mediator.v1.Artifact.created_at:type_name -> google.protobuf.Timestamp - 125, // 4: mediator.v1.SignatureVerification.signature_time:type_name -> google.protobuf.Timestamp + 126, // 3: mediator.v1.Artifact.created_at:type_name -> google.protobuf.Timestamp + 126, // 4: mediator.v1.SignatureVerification.signature_time:type_name -> google.protobuf.Timestamp 8, // 5: mediator.v1.ArtifactVersion.signature_verification:type_name -> mediator.v1.SignatureVerification 7, // 6: mediator.v1.ArtifactVersion.github_workflow:type_name -> mediator.v1.GithubWorkflow - 125, // 7: mediator.v1.ArtifactVersion.created_at:type_name -> google.protobuf.Timestamp + 126, // 7: mediator.v1.ArtifactVersion.created_at:type_name -> google.protobuf.Timestamp 6, // 8: mediator.v1.GetArtifactByIdResponse.artifact:type_name -> mediator.v1.Artifact 9, // 9: mediator.v1.GetArtifactByIdResponse.versions:type_name -> mediator.v1.ArtifactVersion 1, // 10: mediator.v1.Dependency.ecosystem:type_name -> mediator.v1.DepEcosystem 12, // 11: mediator.v1.PrDependencies.pr:type_name -> mediator.v1.PullRequest 105, // 12: mediator.v1.PrDependencies.deps:type_name -> mediator.v1.PrDependencies.ContextualDependency - 125, // 13: mediator.v1.Project.created_at:type_name -> google.protobuf.Timestamp - 125, // 14: mediator.v1.Project.updated_at:type_name -> google.protobuf.Timestamp + 126, // 13: mediator.v1.Project.created_at:type_name -> google.protobuf.Timestamp + 126, // 14: mediator.v1.Project.updated_at:type_name -> google.protobuf.Timestamp 33, // 15: mediator.v1.ListRemoteRepositoriesFromProviderResponse.results:type_name -> mediator.v1.UpstreamRepositoryRef 85, // 16: mediator.v1.Repository.context:type_name -> mediator.v1.Context - 125, // 17: mediator.v1.Repository.created_at:type_name -> google.protobuf.Timestamp - 125, // 18: mediator.v1.Repository.updated_at:type_name -> google.protobuf.Timestamp + 126, // 17: mediator.v1.Repository.created_at:type_name -> google.protobuf.Timestamp + 126, // 18: mediator.v1.Repository.updated_at:type_name -> google.protobuf.Timestamp 33, // 19: mediator.v1.RegisterRepositoryRequest.repositories:type_name -> mediator.v1.UpstreamRepositoryRef 34, // 20: mediator.v1.RegisterRepoResult.repository:type_name -> mediator.v1.Repository 107, // 21: mediator.v1.RegisterRepoResult.status:type_name -> mediator.v1.RegisterRepoResult.Status @@ -9037,15 +9105,15 @@ var file_mediator_v1_mediator_proto_depIdxs = []int32{ 34, // 23: mediator.v1.GetRepositoryByIdResponse.repository:type_name -> mediator.v1.Repository 34, // 24: mediator.v1.GetRepositoryByNameResponse.repository:type_name -> mediator.v1.Repository 34, // 25: mediator.v1.ListRepositoriesResponse.results:type_name -> mediator.v1.Repository - 125, // 26: mediator.v1.VerifyProviderTokenFromRequest.timestamp:type_name -> google.protobuf.Timestamp - 125, // 27: mediator.v1.GetVulnerabilityByIdResponse.scanned_at:type_name -> google.protobuf.Timestamp - 125, // 28: mediator.v1.GetVulnerabilityByIdResponse.created_at:type_name -> google.protobuf.Timestamp + 126, // 26: mediator.v1.VerifyProviderTokenFromRequest.timestamp:type_name -> google.protobuf.Timestamp + 126, // 27: mediator.v1.GetVulnerabilityByIdResponse.scanned_at:type_name -> google.protobuf.Timestamp + 126, // 28: mediator.v1.GetVulnerabilityByIdResponse.created_at:type_name -> google.protobuf.Timestamp 48, // 29: mediator.v1.GetVulnerabilitiesResponse.vulns:type_name -> mediator.v1.GetVulnerabilityByIdResponse 53, // 30: mediator.v1.GetSecretsResponse.secrets:type_name -> mediator.v1.GetSecretByIdResponse 55, // 31: mediator.v1.GetBranchProtectionResponse.branch_protections:type_name -> mediator.v1.BranchProtection - 125, // 32: mediator.v1.CreateUserResponse.created_at:type_name -> google.protobuf.Timestamp - 125, // 33: mediator.v1.UserRecord.created_at:type_name -> google.protobuf.Timestamp - 125, // 34: mediator.v1.UserRecord.updated_at:type_name -> google.protobuf.Timestamp + 126, // 32: mediator.v1.CreateUserResponse.created_at:type_name -> google.protobuf.Timestamp + 126, // 33: mediator.v1.UserRecord.created_at:type_name -> google.protobuf.Timestamp + 126, // 34: mediator.v1.UserRecord.updated_at:type_name -> google.protobuf.Timestamp 61, // 35: mediator.v1.GetUserResponse.user:type_name -> mediator.v1.UserRecord 30, // 36: mediator.v1.GetUserResponse.projects:type_name -> mediator.v1.Project 104, // 37: mediator.v1.CreateProfileRequest.profile:type_name -> mediator.v1.Profile @@ -9055,10 +9123,10 @@ var file_mediator_v1_mediator_proto_depIdxs = []int32{ 104, // 41: mediator.v1.ListProfilesResponse.profiles:type_name -> mediator.v1.Profile 85, // 42: mediator.v1.GetProfileByIdRequest.context:type_name -> mediator.v1.Context 104, // 43: mediator.v1.GetProfileByIdResponse.profile:type_name -> mediator.v1.Profile - 125, // 44: mediator.v1.ProfileStatus.last_updated:type_name -> google.protobuf.Timestamp - 125, // 45: mediator.v1.RuleEvaluationStatus.last_updated:type_name -> google.protobuf.Timestamp + 126, // 44: mediator.v1.ProfileStatus.last_updated:type_name -> google.protobuf.Timestamp + 126, // 45: mediator.v1.RuleEvaluationStatus.last_updated:type_name -> google.protobuf.Timestamp 108, // 46: mediator.v1.RuleEvaluationStatus.entity_info:type_name -> mediator.v1.RuleEvaluationStatus.EntityInfoEntry - 125, // 47: mediator.v1.RuleEvaluationStatus.remediation_last_updated:type_name -> google.protobuf.Timestamp + 126, // 47: mediator.v1.RuleEvaluationStatus.remediation_last_updated:type_name -> google.protobuf.Timestamp 85, // 48: mediator.v1.GetProfileStatusByNameRequest.context:type_name -> mediator.v1.Context 109, // 49: mediator.v1.GetProfileStatusByNameRequest.entity:type_name -> mediator.v1.GetProfileStatusByNameRequest.EntityTypedId 72, // 50: mediator.v1.GetProfileStatusByNameResponse.profile_status:type_name -> mediator.v1.ProfileStatus @@ -9083,17 +9151,17 @@ var file_mediator_v1_mediator_proto_depIdxs = []int32{ 85, // 69: mediator.v1.RuleType.context:type_name -> mediator.v1.Context 114, // 70: mediator.v1.RuleType.def:type_name -> mediator.v1.RuleType.Definition 85, // 71: mediator.v1.Profile.context:type_name -> mediator.v1.Context - 124, // 72: mediator.v1.Profile.repository:type_name -> mediator.v1.Profile.Rule - 124, // 73: mediator.v1.Profile.build_environment:type_name -> mediator.v1.Profile.Rule - 124, // 74: mediator.v1.Profile.artifact:type_name -> mediator.v1.Profile.Rule - 124, // 75: mediator.v1.Profile.pull_request:type_name -> mediator.v1.Profile.Rule + 125, // 72: mediator.v1.Profile.repository:type_name -> mediator.v1.Profile.Rule + 125, // 73: mediator.v1.Profile.build_environment:type_name -> mediator.v1.Profile.Rule + 125, // 74: mediator.v1.Profile.artifact:type_name -> mediator.v1.Profile.Rule + 125, // 75: mediator.v1.Profile.pull_request:type_name -> mediator.v1.Profile.Rule 13, // 76: mediator.v1.PrDependencies.ContextualDependency.dep:type_name -> mediator.v1.Dependency 106, // 77: mediator.v1.PrDependencies.ContextualDependency.file:type_name -> mediator.v1.PrDependencies.ContextualDependency.FilePatch 2, // 78: mediator.v1.GetProfileStatusByNameRequest.EntityTypedId.type:type_name -> mediator.v1.Entity 82, // 79: mediator.v1.Provider.Definition.rest:type_name -> mediator.v1.RESTProviderConfig 83, // 80: mediator.v1.Provider.Definition.github:type_name -> mediator.v1.GitHubProviderConfig - 126, // 81: mediator.v1.RuleType.Definition.rule_schema:type_name -> google.protobuf.Struct - 126, // 82: mediator.v1.RuleType.Definition.param_schema:type_name -> google.protobuf.Struct + 127, // 81: mediator.v1.RuleType.Definition.rule_schema:type_name -> google.protobuf.Struct + 127, // 82: mediator.v1.RuleType.Definition.param_schema:type_name -> google.protobuf.Struct 115, // 83: mediator.v1.RuleType.Definition.ingest:type_name -> mediator.v1.RuleType.Definition.Ingest 116, // 84: mediator.v1.RuleType.Definition.eval:type_name -> mediator.v1.RuleType.Definition.Eval 117, // 85: mediator.v1.RuleType.Definition.remediate:type_name -> mediator.v1.RuleType.Definition.Remediate @@ -9107,84 +9175,85 @@ var file_mediator_v1_mediator_proto_depIdxs = []int32{ 120, // 93: mediator.v1.RuleType.Definition.Eval.rego:type_name -> mediator.v1.RuleType.Definition.Eval.Rego 121, // 94: mediator.v1.RuleType.Definition.Eval.vulncheck:type_name -> mediator.v1.RuleType.Definition.Eval.Vulncheck 98, // 95: mediator.v1.RuleType.Definition.Remediate.rest:type_name -> mediator.v1.RestType - 123, // 96: mediator.v1.RuleType.Definition.Alert.security_advisory:type_name -> mediator.v1.RuleType.Definition.Alert.AlertTypeSA - 122, // 97: mediator.v1.RuleType.Definition.Eval.JQComparison.ingested:type_name -> mediator.v1.RuleType.Definition.Eval.JQComparison.Operator - 122, // 98: mediator.v1.RuleType.Definition.Eval.JQComparison.profile:type_name -> mediator.v1.RuleType.Definition.Eval.JQComparison.Operator - 126, // 99: mediator.v1.Profile.Rule.params:type_name -> google.protobuf.Struct - 126, // 100: mediator.v1.Profile.Rule.def:type_name -> google.protobuf.Struct - 127, // 101: mediator.v1.rpc_options:extendee -> google.protobuf.MethodOptions - 3, // 102: mediator.v1.rpc_options:type_name -> mediator.v1.RpcOptions - 15, // 103: mediator.v1.HealthService.CheckHealth:input_type -> mediator.v1.CheckHealthRequest - 4, // 104: mediator.v1.ArtifactService.ListArtifacts:input_type -> mediator.v1.ListArtifactsRequest - 10, // 105: mediator.v1.ArtifactService.GetArtifactById:input_type -> mediator.v1.GetArtifactByIdRequest - 17, // 106: mediator.v1.OAuthService.GetAuthorizationURL:input_type -> mediator.v1.GetAuthorizationURLRequest - 19, // 107: mediator.v1.OAuthService.ExchangeCodeForTokenCLI:input_type -> mediator.v1.ExchangeCodeForTokenCLIRequest - 22, // 108: mediator.v1.OAuthService.ExchangeCodeForTokenWEB:input_type -> mediator.v1.ExchangeCodeForTokenWEBRequest - 20, // 109: mediator.v1.OAuthService.StoreProviderToken:input_type -> mediator.v1.StoreProviderTokenRequest - 24, // 110: mediator.v1.OAuthService.RevokeOauthTokens:input_type -> mediator.v1.RevokeOauthTokensRequest - 26, // 111: mediator.v1.OAuthService.RevokeOauthProjectToken:input_type -> mediator.v1.RevokeOauthProjectTokenRequest - 44, // 112: mediator.v1.OAuthService.VerifyProviderTokenFrom:input_type -> mediator.v1.VerifyProviderTokenFromRequest - 35, // 113: mediator.v1.RepositoryService.RegisterRepository:input_type -> mediator.v1.RegisterRepositoryRequest - 31, // 114: mediator.v1.RepositoryService.ListRemoteRepositoriesFromProvider:input_type -> mediator.v1.ListRemoteRepositoriesFromProviderRequest - 42, // 115: mediator.v1.RepositoryService.ListRepositories:input_type -> mediator.v1.ListRepositoriesRequest - 38, // 116: mediator.v1.RepositoryService.GetRepositoryById:input_type -> mediator.v1.GetRepositoryByIdRequest - 40, // 117: mediator.v1.RepositoryService.GetRepositoryByName:input_type -> mediator.v1.GetRepositoryByNameRequest - 54, // 118: mediator.v1.BranchProtectionService.GetBranchProtection:input_type -> mediator.v1.GetBranchProtectionRequest - 57, // 119: mediator.v1.UserService.CreateUser:input_type -> mediator.v1.CreateUserRequest - 59, // 120: mediator.v1.UserService.DeleteUser:input_type -> mediator.v1.DeleteUserRequest - 62, // 121: mediator.v1.UserService.GetUser:input_type -> mediator.v1.GetUserRequest - 64, // 122: mediator.v1.ProfileService.CreateProfile:input_type -> mediator.v1.CreateProfileRequest - 66, // 123: mediator.v1.ProfileService.DeleteProfile:input_type -> mediator.v1.DeleteProfileRequest - 68, // 124: mediator.v1.ProfileService.ListProfiles:input_type -> mediator.v1.ListProfilesRequest - 70, // 125: mediator.v1.ProfileService.GetProfileById:input_type -> mediator.v1.GetProfileByIdRequest - 74, // 126: mediator.v1.ProfileService.GetProfileStatusByName:input_type -> mediator.v1.GetProfileStatusByNameRequest - 76, // 127: mediator.v1.ProfileService.GetProfileStatusByProject:input_type -> mediator.v1.GetProfileStatusByProjectRequest - 86, // 128: mediator.v1.ProfileService.ListRuleTypes:input_type -> mediator.v1.ListRuleTypesRequest - 88, // 129: mediator.v1.ProfileService.GetRuleTypeByName:input_type -> mediator.v1.GetRuleTypeByNameRequest - 90, // 130: mediator.v1.ProfileService.GetRuleTypeById:input_type -> mediator.v1.GetRuleTypeByIdRequest - 92, // 131: mediator.v1.ProfileService.CreateRuleType:input_type -> mediator.v1.CreateRuleTypeRequest - 94, // 132: mediator.v1.ProfileService.UpdateRuleType:input_type -> mediator.v1.UpdateRuleTypeRequest - 96, // 133: mediator.v1.ProfileService.DeleteRuleType:input_type -> mediator.v1.DeleteRuleTypeRequest - 78, // 134: mediator.v1.KeyService.GetPublicKey:input_type -> mediator.v1.GetPublicKeyRequest - 80, // 135: mediator.v1.KeyService.CreateKeyPair:input_type -> mediator.v1.CreateKeyPairRequest - 16, // 136: mediator.v1.HealthService.CheckHealth:output_type -> mediator.v1.CheckHealthResponse - 5, // 137: mediator.v1.ArtifactService.ListArtifacts:output_type -> mediator.v1.ListArtifactsResponse - 11, // 138: mediator.v1.ArtifactService.GetArtifactById:output_type -> mediator.v1.GetArtifactByIdResponse - 18, // 139: mediator.v1.OAuthService.GetAuthorizationURL:output_type -> mediator.v1.GetAuthorizationURLResponse - 128, // 140: mediator.v1.OAuthService.ExchangeCodeForTokenCLI:output_type -> google.api.HttpBody - 23, // 141: mediator.v1.OAuthService.ExchangeCodeForTokenWEB:output_type -> mediator.v1.ExchangeCodeForTokenWEBResponse - 21, // 142: mediator.v1.OAuthService.StoreProviderToken:output_type -> mediator.v1.StoreProviderTokenResponse - 25, // 143: mediator.v1.OAuthService.RevokeOauthTokens:output_type -> mediator.v1.RevokeOauthTokensResponse - 27, // 144: mediator.v1.OAuthService.RevokeOauthProjectToken:output_type -> mediator.v1.RevokeOauthProjectTokenResponse - 45, // 145: mediator.v1.OAuthService.VerifyProviderTokenFrom:output_type -> mediator.v1.VerifyProviderTokenFromResponse - 37, // 146: mediator.v1.RepositoryService.RegisterRepository:output_type -> mediator.v1.RegisterRepositoryResponse - 32, // 147: mediator.v1.RepositoryService.ListRemoteRepositoriesFromProvider:output_type -> mediator.v1.ListRemoteRepositoriesFromProviderResponse - 43, // 148: mediator.v1.RepositoryService.ListRepositories:output_type -> mediator.v1.ListRepositoriesResponse - 39, // 149: mediator.v1.RepositoryService.GetRepositoryById:output_type -> mediator.v1.GetRepositoryByIdResponse - 41, // 150: mediator.v1.RepositoryService.GetRepositoryByName:output_type -> mediator.v1.GetRepositoryByNameResponse - 56, // 151: mediator.v1.BranchProtectionService.GetBranchProtection:output_type -> mediator.v1.GetBranchProtectionResponse - 58, // 152: mediator.v1.UserService.CreateUser:output_type -> mediator.v1.CreateUserResponse - 60, // 153: mediator.v1.UserService.DeleteUser:output_type -> mediator.v1.DeleteUserResponse - 63, // 154: mediator.v1.UserService.GetUser:output_type -> mediator.v1.GetUserResponse - 65, // 155: mediator.v1.ProfileService.CreateProfile:output_type -> mediator.v1.CreateProfileResponse - 67, // 156: mediator.v1.ProfileService.DeleteProfile:output_type -> mediator.v1.DeleteProfileResponse - 69, // 157: mediator.v1.ProfileService.ListProfiles:output_type -> mediator.v1.ListProfilesResponse - 71, // 158: mediator.v1.ProfileService.GetProfileById:output_type -> mediator.v1.GetProfileByIdResponse - 75, // 159: mediator.v1.ProfileService.GetProfileStatusByName:output_type -> mediator.v1.GetProfileStatusByNameResponse - 77, // 160: mediator.v1.ProfileService.GetProfileStatusByProject:output_type -> mediator.v1.GetProfileStatusByProjectResponse - 87, // 161: mediator.v1.ProfileService.ListRuleTypes:output_type -> mediator.v1.ListRuleTypesResponse - 89, // 162: mediator.v1.ProfileService.GetRuleTypeByName:output_type -> mediator.v1.GetRuleTypeByNameResponse - 91, // 163: mediator.v1.ProfileService.GetRuleTypeById:output_type -> mediator.v1.GetRuleTypeByIdResponse - 93, // 164: mediator.v1.ProfileService.CreateRuleType:output_type -> mediator.v1.CreateRuleTypeResponse - 95, // 165: mediator.v1.ProfileService.UpdateRuleType:output_type -> mediator.v1.UpdateRuleTypeResponse - 97, // 166: mediator.v1.ProfileService.DeleteRuleType:output_type -> mediator.v1.DeleteRuleTypeResponse - 79, // 167: mediator.v1.KeyService.GetPublicKey:output_type -> mediator.v1.GetPublicKeyResponse - 81, // 168: mediator.v1.KeyService.CreateKeyPair:output_type -> mediator.v1.CreateKeyPairResponse - 136, // [136:169] is the sub-list for method output_type - 103, // [103:136] is the sub-list for method input_type - 102, // [102:103] is the sub-list for extension type_name - 101, // [101:102] is the sub-list for extension extendee - 0, // [0:101] is the sub-list for field type_name + 123, // 96: mediator.v1.RuleType.Definition.Remediate.gh_branch_protection:type_name -> mediator.v1.RuleType.Definition.Remediate.GhBranchProtectionType + 124, // 97: mediator.v1.RuleType.Definition.Alert.security_advisory:type_name -> mediator.v1.RuleType.Definition.Alert.AlertTypeSA + 122, // 98: mediator.v1.RuleType.Definition.Eval.JQComparison.ingested:type_name -> mediator.v1.RuleType.Definition.Eval.JQComparison.Operator + 122, // 99: mediator.v1.RuleType.Definition.Eval.JQComparison.profile:type_name -> mediator.v1.RuleType.Definition.Eval.JQComparison.Operator + 127, // 100: mediator.v1.Profile.Rule.params:type_name -> google.protobuf.Struct + 127, // 101: mediator.v1.Profile.Rule.def:type_name -> google.protobuf.Struct + 128, // 102: mediator.v1.rpc_options:extendee -> google.protobuf.MethodOptions + 3, // 103: mediator.v1.rpc_options:type_name -> mediator.v1.RpcOptions + 15, // 104: mediator.v1.HealthService.CheckHealth:input_type -> mediator.v1.CheckHealthRequest + 4, // 105: mediator.v1.ArtifactService.ListArtifacts:input_type -> mediator.v1.ListArtifactsRequest + 10, // 106: mediator.v1.ArtifactService.GetArtifactById:input_type -> mediator.v1.GetArtifactByIdRequest + 17, // 107: mediator.v1.OAuthService.GetAuthorizationURL:input_type -> mediator.v1.GetAuthorizationURLRequest + 19, // 108: mediator.v1.OAuthService.ExchangeCodeForTokenCLI:input_type -> mediator.v1.ExchangeCodeForTokenCLIRequest + 22, // 109: mediator.v1.OAuthService.ExchangeCodeForTokenWEB:input_type -> mediator.v1.ExchangeCodeForTokenWEBRequest + 20, // 110: mediator.v1.OAuthService.StoreProviderToken:input_type -> mediator.v1.StoreProviderTokenRequest + 24, // 111: mediator.v1.OAuthService.RevokeOauthTokens:input_type -> mediator.v1.RevokeOauthTokensRequest + 26, // 112: mediator.v1.OAuthService.RevokeOauthProjectToken:input_type -> mediator.v1.RevokeOauthProjectTokenRequest + 44, // 113: mediator.v1.OAuthService.VerifyProviderTokenFrom:input_type -> mediator.v1.VerifyProviderTokenFromRequest + 35, // 114: mediator.v1.RepositoryService.RegisterRepository:input_type -> mediator.v1.RegisterRepositoryRequest + 31, // 115: mediator.v1.RepositoryService.ListRemoteRepositoriesFromProvider:input_type -> mediator.v1.ListRemoteRepositoriesFromProviderRequest + 42, // 116: mediator.v1.RepositoryService.ListRepositories:input_type -> mediator.v1.ListRepositoriesRequest + 38, // 117: mediator.v1.RepositoryService.GetRepositoryById:input_type -> mediator.v1.GetRepositoryByIdRequest + 40, // 118: mediator.v1.RepositoryService.GetRepositoryByName:input_type -> mediator.v1.GetRepositoryByNameRequest + 54, // 119: mediator.v1.BranchProtectionService.GetBranchProtection:input_type -> mediator.v1.GetBranchProtectionRequest + 57, // 120: mediator.v1.UserService.CreateUser:input_type -> mediator.v1.CreateUserRequest + 59, // 121: mediator.v1.UserService.DeleteUser:input_type -> mediator.v1.DeleteUserRequest + 62, // 122: mediator.v1.UserService.GetUser:input_type -> mediator.v1.GetUserRequest + 64, // 123: mediator.v1.ProfileService.CreateProfile:input_type -> mediator.v1.CreateProfileRequest + 66, // 124: mediator.v1.ProfileService.DeleteProfile:input_type -> mediator.v1.DeleteProfileRequest + 68, // 125: mediator.v1.ProfileService.ListProfiles:input_type -> mediator.v1.ListProfilesRequest + 70, // 126: mediator.v1.ProfileService.GetProfileById:input_type -> mediator.v1.GetProfileByIdRequest + 74, // 127: mediator.v1.ProfileService.GetProfileStatusByName:input_type -> mediator.v1.GetProfileStatusByNameRequest + 76, // 128: mediator.v1.ProfileService.GetProfileStatusByProject:input_type -> mediator.v1.GetProfileStatusByProjectRequest + 86, // 129: mediator.v1.ProfileService.ListRuleTypes:input_type -> mediator.v1.ListRuleTypesRequest + 88, // 130: mediator.v1.ProfileService.GetRuleTypeByName:input_type -> mediator.v1.GetRuleTypeByNameRequest + 90, // 131: mediator.v1.ProfileService.GetRuleTypeById:input_type -> mediator.v1.GetRuleTypeByIdRequest + 92, // 132: mediator.v1.ProfileService.CreateRuleType:input_type -> mediator.v1.CreateRuleTypeRequest + 94, // 133: mediator.v1.ProfileService.UpdateRuleType:input_type -> mediator.v1.UpdateRuleTypeRequest + 96, // 134: mediator.v1.ProfileService.DeleteRuleType:input_type -> mediator.v1.DeleteRuleTypeRequest + 78, // 135: mediator.v1.KeyService.GetPublicKey:input_type -> mediator.v1.GetPublicKeyRequest + 80, // 136: mediator.v1.KeyService.CreateKeyPair:input_type -> mediator.v1.CreateKeyPairRequest + 16, // 137: mediator.v1.HealthService.CheckHealth:output_type -> mediator.v1.CheckHealthResponse + 5, // 138: mediator.v1.ArtifactService.ListArtifacts:output_type -> mediator.v1.ListArtifactsResponse + 11, // 139: mediator.v1.ArtifactService.GetArtifactById:output_type -> mediator.v1.GetArtifactByIdResponse + 18, // 140: mediator.v1.OAuthService.GetAuthorizationURL:output_type -> mediator.v1.GetAuthorizationURLResponse + 129, // 141: mediator.v1.OAuthService.ExchangeCodeForTokenCLI:output_type -> google.api.HttpBody + 23, // 142: mediator.v1.OAuthService.ExchangeCodeForTokenWEB:output_type -> mediator.v1.ExchangeCodeForTokenWEBResponse + 21, // 143: mediator.v1.OAuthService.StoreProviderToken:output_type -> mediator.v1.StoreProviderTokenResponse + 25, // 144: mediator.v1.OAuthService.RevokeOauthTokens:output_type -> mediator.v1.RevokeOauthTokensResponse + 27, // 145: mediator.v1.OAuthService.RevokeOauthProjectToken:output_type -> mediator.v1.RevokeOauthProjectTokenResponse + 45, // 146: mediator.v1.OAuthService.VerifyProviderTokenFrom:output_type -> mediator.v1.VerifyProviderTokenFromResponse + 37, // 147: mediator.v1.RepositoryService.RegisterRepository:output_type -> mediator.v1.RegisterRepositoryResponse + 32, // 148: mediator.v1.RepositoryService.ListRemoteRepositoriesFromProvider:output_type -> mediator.v1.ListRemoteRepositoriesFromProviderResponse + 43, // 149: mediator.v1.RepositoryService.ListRepositories:output_type -> mediator.v1.ListRepositoriesResponse + 39, // 150: mediator.v1.RepositoryService.GetRepositoryById:output_type -> mediator.v1.GetRepositoryByIdResponse + 41, // 151: mediator.v1.RepositoryService.GetRepositoryByName:output_type -> mediator.v1.GetRepositoryByNameResponse + 56, // 152: mediator.v1.BranchProtectionService.GetBranchProtection:output_type -> mediator.v1.GetBranchProtectionResponse + 58, // 153: mediator.v1.UserService.CreateUser:output_type -> mediator.v1.CreateUserResponse + 60, // 154: mediator.v1.UserService.DeleteUser:output_type -> mediator.v1.DeleteUserResponse + 63, // 155: mediator.v1.UserService.GetUser:output_type -> mediator.v1.GetUserResponse + 65, // 156: mediator.v1.ProfileService.CreateProfile:output_type -> mediator.v1.CreateProfileResponse + 67, // 157: mediator.v1.ProfileService.DeleteProfile:output_type -> mediator.v1.DeleteProfileResponse + 69, // 158: mediator.v1.ProfileService.ListProfiles:output_type -> mediator.v1.ListProfilesResponse + 71, // 159: mediator.v1.ProfileService.GetProfileById:output_type -> mediator.v1.GetProfileByIdResponse + 75, // 160: mediator.v1.ProfileService.GetProfileStatusByName:output_type -> mediator.v1.GetProfileStatusByNameResponse + 77, // 161: mediator.v1.ProfileService.GetProfileStatusByProject:output_type -> mediator.v1.GetProfileStatusByProjectResponse + 87, // 162: mediator.v1.ProfileService.ListRuleTypes:output_type -> mediator.v1.ListRuleTypesResponse + 89, // 163: mediator.v1.ProfileService.GetRuleTypeByName:output_type -> mediator.v1.GetRuleTypeByNameResponse + 91, // 164: mediator.v1.ProfileService.GetRuleTypeById:output_type -> mediator.v1.GetRuleTypeByIdResponse + 93, // 165: mediator.v1.ProfileService.CreateRuleType:output_type -> mediator.v1.CreateRuleTypeResponse + 95, // 166: mediator.v1.ProfileService.UpdateRuleType:output_type -> mediator.v1.UpdateRuleTypeResponse + 97, // 167: mediator.v1.ProfileService.DeleteRuleType:output_type -> mediator.v1.DeleteRuleTypeResponse + 79, // 168: mediator.v1.KeyService.GetPublicKey:output_type -> mediator.v1.GetPublicKeyResponse + 81, // 169: mediator.v1.KeyService.CreateKeyPair:output_type -> mediator.v1.CreateKeyPairResponse + 137, // [137:170] is the sub-list for method output_type + 104, // [104:137] is the sub-list for method input_type + 103, // [103:104] is the sub-list for extension type_name + 102, // [102:103] is the sub-list for extension extendee + 0, // [0:102] is the sub-list for field type_name } func init() { file_mediator_v1_mediator_proto_init() } @@ -10622,7 +10691,7 @@ func file_mediator_v1_mediator_proto_init() { } } file_mediator_v1_mediator_proto_msgTypes[120].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuleType_Definition_Alert_AlertTypeSA); i { + switch v := v.(*RuleType_Definition_Remediate_GhBranchProtectionType); i { case 0: return &v.state case 1: @@ -10634,6 +10703,18 @@ func file_mediator_v1_mediator_proto_init() { } } file_mediator_v1_mediator_proto_msgTypes[121].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RuleType_Definition_Alert_AlertTypeSA); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mediator_v1_mediator_proto_msgTypes[122].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Profile_Rule); i { case 0: return &v.state @@ -10672,7 +10753,7 @@ func file_mediator_v1_mediator_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_mediator_v1_mediator_proto_rawDesc, NumEnums: 3, - NumMessages: 122, + NumMessages: 123, NumExtensions: 1, NumServices: 8, }, diff --git a/pkg/providers/v1/providers.go b/pkg/providers/v1/providers.go index 2c682604e0..cccb7de1b3 100644 --- a/pkg/providers/v1/providers.go +++ b/pkg/providers/v1/providers.go @@ -82,6 +82,7 @@ type GitHub interface { GetRepository(context.Context, string, string) (*github.Repository, error) ListAllRepositories(context.Context, bool, string) ([]*github.Repository, error) GetBranchProtection(context.Context, string, string, string) (*github.Protection, error) + UpdateBranchProtection(context.Context, string, string, string, *github.ProtectionRequest) error ListAllPackages(context.Context, bool, string, string, int, int) ([]*github.Package, error) ListPackagesByRepository(context.Context, bool, string, string, int64, int, int) ([]*github.Package, error) GetPackageByName(context.Context, bool, string, string, string) (*github.Package, error) diff --git a/proto/mediator/v1/mediator.proto b/proto/mediator/v1/mediator.proto index 1c2d335e47..00c8295184 100644 --- a/proto/mediator/v1/mediator.proto +++ b/proto/mediator/v1/mediator.proto @@ -1259,7 +1259,12 @@ message RuleType { message Remediate { string type = 1; + message GhBranchProtectionType { + string patch = 1; + } + optional RestType rest = 2; + optional GhBranchProtectionType gh_branch_protection = 3; } Remediate remediate = 6;