Skip to content

AUTH_TYPE=HTTP configuration #29

Closed
@bkbonner

Description

@bkbonner

I'm trying to setup GERRIT using the Docker image and it's giving me a configuration error.

I'm using:

docker run --name gerrit --volumes-from gerrit_volume -p 8084:8080 -p 29418:29418 -e WEBURL=http://10.23.10.214:8084 -e SMTP_SERVER=smtp.na.jnj.com -e SMTP_SERVER_PORT=25 -e SMTP_ENCRYPTION=tls -e SMTP_CONNECT_TIMEOUT=10sec -e SMTP_FROM=USER -e AUTH_TYPE=HTTP -d openfrontier/gerrit

The error is:

The HTTP server did not provide the username in the Authorization header when it forwarded the request to Gerrit Code Review.

If the HTTP server is Apache HTTPd, check the proxy configuration includes an authorization directive with the proper location, ensuring it ends with '/':

ServerName localhost
ProxyRequests Off
ProxyVia Off
ProxyPreserveHost On

<Proxy *>
      Order deny,allow
      Allow from all
</Proxy>

<Location /login/>
  AuthType Basic
  AuthName "Gerrit Code Review"
  Require valid-user
  ...
</Location>

AllowEncodedSlashes On
ProxyPass / http://.../ nodecode

I don't see anything about configuration of HTTP beyond the -e AUTH_TYPE = HTTP.

Is there something I'm missing?

Activity

thinkernel

thinkernel commented on Oct 17, 2016

@thinkernel
Contributor

Try adding this one to your command line.
-e HTTPD_LISTENURL=proxy-http://*:8080

bkbonner

bkbonner commented on Oct 17, 2016

@bkbonner
Author

Does this configuration require that I have an http server setup in front
of gerrit as an external configuration? Or is it included as part of the
install?

Brian

On Mon, Oct 17, 2016 at 2:11 AM, thinkernel notifications@github.com
wrote:

Try adding this one to your command line.
-e HTTPD_LISTENURL=proxy-http://*:8080 \


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#29 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAowebHgsg9jj-1jBf1WI3EucFZVqqOeks5q0xGkgaJpZM4KXQ5v
.

thinkernel

thinkernel commented on Oct 18, 2016

@thinkernel
Contributor

Yes. That means you need to setup a http server as a reverse proxy. Auth_TYPE=HTTP means you want to provide the authentication in your proxy. Gerrit doesn't provide any authentication method itself. You have to choose between OpenID, Oauth, LDAP and HTTP providers.

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

        Participants

        @bkbonner@thinkernel

        Issue actions

          AUTH_TYPE=HTTP configuration · Issue #29 · openfrontier/docker-gerrit