8000 I'm looking for a way to import gerrit ACl's to Zoket · Issue #101 · google/zoekt · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

I'm looking for a way to import gerrit ACl's to Zoket #101

Open

Description

@aswathb

Hi Team,
I'm looking for a way to import gerrit ACL's to Zoket, Please let me know the steps to do it or any documentation that I can refer to mirror gerrit ACL's into Zoket.
Looking for a way to block the users at the repository level and at the branch level as well in Zoket.

Activity

  1. changed the title [-]Please help me in setting "must set --repo_cache". [/-] [+]I'm looking for a way to import gerrit ACl's to Zoket[/+] on Sep 9, 2019
  2. hanwen commented on Nov 27, 2019

    @hanwen
    Contributor

    "So, here is what you have to do

    1. build a plugin in Gerrit that acts as a HTTP proxy. The plugin should enforce users to be logged in, and forward requests to a Zoekt instance, but also set a

    X-Gerrit-AccountId: 1234

    header.

    1. Update the web server to extract the gerrit account ID from the HTTP request, and set it in the HTTP Context.

    2. write a wrapper around zoekt.Searcher

    zoekt/api.go

    Line 263 in b1730d8

    type Searcher interface {

    that extracts the Gerrit user from the context. Then it should call back to the Gerrit instance, executing /check.access to verify if the user has access. If not, returon no results.

    Then, when deploying, you create a firewall, so only the gerrit server can contact the zoekt server.

    Overall, this is not an easy task. Good luck!"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0