Banno / getsentry-ldap-auth

A Sentry extension to add an LDAP server as an authention source.
Apache License 2.0
163 stars 54 forks source link

Sentry version 10 Support #44

Closed DennisGabriel closed 4 years ago

DennisGabriel commented 4 years ago

Hello, i know sentry 10 is just out for a month or so but I would like to know if the LDAP module should work with it?

I just tried to Install it on a fresh sentry 10 Installation on centos 7 and I'm unable to get of to Work.

Could be me and I'm doing something wrong but I wanted to ask to make sure.

Thanks

DennisGabriel commented 4 years ago

After some trial and error i got it to work. Simply added:

RUN apt-get update && apt-get install -y libldap2-dev libsasl2-dev python-pip
RUN pip install getsentry-ldap-auth

to the dockerfile.

Almost the same as described here: https://github.com/Banno/getsentry-ldap-auth/issues/30

webkong commented 4 years ago

After some trial and error i got it to work. Simply added:

RUN apt-get update && apt-get install -y libldap2-dev libsasl2-dev python-pip
RUN pip install getsentry-ldap-auth

to the dockerfile.

Almost the same as described here: #30

but i get an error

Step 5/7 : RUN pip install sentry-ldap-auth
 ---> Running in 932b7b525d70
Collecting sentry-ldap-auth
  Downloading sentry-ldap-auth-2.8.1.tar.gz (4.8 kB)
Collecting django-auth-ldap==1.2.*
  Downloading django_auth_ldap-1.2.17-py3-none-any.whl (30 kB)
Collecting sentry>=8.0.0
  Downloading sentry-9.1.2.tar.gz (25.2 MB)
Collecting django
  Downloading Django-3.0.4-py3-none-any.whl (7.5 MB)
Collecting pyldap
  Downloading pyldap-3.0.0.post1-py3-none-any.whl (3.0 kB)
Collecting BeautifulSoup>=3.2.1
  Downloading BeautifulSoup-3.2.2.tar.gz (32 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ggki2o0p/BeautifulSoup/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ggki2o0p/BeautifulSoup/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-ggki2o0p/BeautifulSoup/pip-egg-info
         cwd: /tmp/pip-install-ggki2o0p/BeautifulSoup/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-ggki2o0p/BeautifulSoup/setup.py", line 3
        "You're trying to run a very old release of Beautiful Soup under Python 3. This will not work."<>"Please use Beautiful Soup 4, available through the pip package 'beautifulsoup4'."
                                                                                                        ^
    SyntaxError: invalid syntax
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
DennisGabriel commented 4 years ago

Hmm i remember seeing the same error while trying to get it to work but i always went back to my starting point to do a clean install. In the end i'm pretty sure there is nothing else i did.

Maybe try to update pip and setup tools?!

pip install --upgrade pip
pip install --upgrade setuptools
webkong commented 4 years ago

Hmm i remember seeing the same error while trying to get it to work but i always went back to my starting point to do a clean install. In the end i'm pretty sure there is nothing else i did.

Maybe try to update pip and setup tools?!

pip install --upgrade pip
pip install --upgrade setuptools

thanks for your reply, I try it, but it's not work.

FeSeason commented 4 years ago

@DennisGabriel Could you show your dockerfile config ?

SrMouraSilva commented 4 years ago

@cench, This way works @barronhagerman, maybe put in README.md?

sentry/Dockerfile

ARG SENTRY_VERSION=latest
ARG SENTRY_IMAGE
FROM ${SENTRY_IMAGE:-getsentry/sentry:$SENTRY_VERSION}

# ------------------
# add this code
RUN apt-get update  \
 && apt-get install -y --no-install-recommends\
            gcc \
            libsasl2-dev libldap2-dev libssl-dev \
 && rm -rf /var/lib/apt/lists/*
# End of "add this code"
# ------------------

COPY . /usr/src/sentry

# Hook for installing additional plugins
RUN if [ -s /usr/src/sentry/requirements.txt ]; then pip install -r /usr/src/sentry/requirements.txt; fi

sentry/requirements.txt

# Add plugins here
sentry-ldap-auth