<html><head><title></title></head><body><!-- rte-version 0.2 9947551637294008b77bce25eb683dac --><div class="rte-style-maintainer rte-pre-wrap" data-color="global-default" bbg-color="default" data-bb-font-size="medium"bbg-font-size="medium" style="white-space: pre-wrap; font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";"style="white-space: pre-wrap; font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; color: rgb(0, 0, 0);"><br><div class="rte-style-maintainer" data-color="global-default"bbg-color="default" data-bb-font-size="medium" bbg-font-size="medium" style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";"style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; color: rgb(0, 0, 0);">I wonder if we could set the below in /etc/pulp/settings.py. The doc use a tuple. I replaced with a list since I couldn't figure out how to set a tuple in ansible pulp_installer. It seems to work.</div><div class="rte-style-maintainer" data-color="global-default"bbg-color="default" data-bb-font-size="medium" bbg-font-size="medium" style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";"style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; color: rgb(0, 0, 0);"><br></div><div class="rte-style-maintainer" data-color="global-default"bbg-color="default" data-bb-font-size="medium" bbg-font-size="medium" style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";"style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; color: rgb(0, 0, 0);">REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ["rest_framework.authentication.SessionAuthentication", "pulpcore.app.authentica</div><div class="rte-style-maintainer" data-color="global-default"bbg-color="default" data-bb-font-size="medium" bbg-font-size="medium" style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";"style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; color: rgb(0, 0, 0);">tion.PulpRemoteUserAuthentication"]</div><div class="rte-style-maintainer" data-color="global-default"bbg-color="default" data-bb-font-size="medium" bbg-font-size="medium" style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";"style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; color: rgb(0, 0, 0);"><br></div><div class="rte-style-maintainer" data-color="global-default"bbg-color="default" data-bb-font-size="medium" bbg-font-size="medium" style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";"style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; color: rgb(0, 0, 0);"><br></div><div class="rte-style-maintainer" data-color="global-default"bbg-color="default" data-bb-font-size="medium" bbg-font-size="medium" style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";"style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; color: rgb(0, 0, 0);">Thanks.<br><div class="bbg-rte-fold-content" data-header="From: Bin Li (BLOOMBERG/ 120 PARK) At: 04/24/20 22:40:15"data-digest="From: Bin Li (BLOOMBERG/ 120 PARK) At: 04/24/20 22:40:15" style=""><div class="bbg-rte-fold-summary">From: Bin Li (BLOOMBERG/ 120 PARK) At: 04/24/20 22:40:15</div>To: <a spellcheck="false" bbg-destination="mailto:dkliban@redhat.com" href="mailto:dkliban@redhat.com"> dkliban@redhat.com</a><br>Cc: <a spellcheck="false"bbg-destination="mailto:pulp-list@redhat.com" href="mailto:pulp-list@redhat.com"> pulp-list@redhat.com</a><br>Subject: Re: [Pulp-list] pulpcore-client 3.2 ldap authentication</div><br><div class="rte-style-maintainer rte-pre-wrap" data-color="global-default" bbg-color="default" data-bb-font-size="medium"bbg-font-size="medium" style="white-space: pre-wrap; font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";"style="white-space: pre-wrap; font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; color: rgb(0, 0, 0);">Thanks Dennis. It works now by setting proxy_set_header REMOTE_USER 'admin' in nginx.conf. It was set to $remote_user.<br><br><div class="rte-style-maintainer" data-color="global-default"bbg-color="default" data-bb-font-size="medium" bbg-font-size="medium" style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";"style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; color: rgb(0, 0, 0);"><div><div class="bbg-rte-fold-content" data-header="From: dkliban@redhat.com At: 04/23/20 08:11:20" data-digest="From: dkliban@redhat.com At: 04/23/20 08:11:20" style=""><div class="bbg-rte-fold-summary">From: dkliban@redhat.com At: 04/23/20 08:11:20</div>To: <a spellcheck="false" bbg-destination="mailto:bli111@bloomberg.net" href="mailto:bli111@bloomberg.net"> Bin Li (BLOOMBERG/ 120 PARK ) </a><br>Cc: <a spellcheck="false"bbg-destination="mailto:pulp-list@redhat.com" href="mailto:pulp-list@redhat.com"> pulp-list@redhat.com</a><br>Subject: Re: [Pulp-list] pulpcore-client 3.2 ldap authentication</div><br></div><div class="rte-internet-block-wrapper" style="background: white; color: black; font-family: Arial, "BB.Proportional"; font-size: small; white-space: normal;"><div class="rte-internet-block"><blockquote><div dir="ltr">All the settings look correct to me. It seems like nginx is not setting HTTP_REMOTE_USER header on the request it passes to guincorn. The value of this header needs to always be 'admin' since that is the only user in the system right now. <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 22, 2020 at 9:43 AM Bin Li (BLOOMBERG/ 120 PARK) <<a spellcheck="false"bbg-destination="mailto:rte:bind" class="" href="mailto:bli111@bloomberg.net" data-destination="mailto:rte:bind">bli111@bloomberg.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; white-space: pre-wrap;">Django app detected<div>Working in development environment </div><div>BASE_DIR<str> '/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/pulpcore/app'</div><div>DEBUG<bool> False</div><div>ALLOWED_HOSTS<list> ['*']</div><div>MEDIA_ROOT<str> '/var/lib/pulp/'</div><div>STATIC_ROOT<str> '/var/lib/pulp/assets/'</div><div>DEFAULT_FILE_STORAGE<str> 'pulpcore.app.models.storage.FileSystem'</div><div>FILE_UPLOAD_TEMP_DIR<str> '/var/lib/pulp/tmp/'</div><div>WORKING_DIRECTORY<str> '/var/lib/pulp/tmp/'</div><div>FILE_UPLOAD_HANDLERS<list> ['pulpcore.app.files.HashingFileUploadHandler']</div><div>SECRET_KEY<str> '3e$d+861lqv8x6y39p%^0!3(=%jzw6()g!u44%(=u@1_5p42g!'</div><div>INSTALLED_APPS<list> ['django.contrib.admin',</div><div> 'django.contrib.auth',</div><div> 'django.contrib.contenttypes',</div><div> 'django.contrib.sessions',</div><div> 'django.contrib.messages',</div><div> 'django.contrib.staticfiles',</div><div> 'django_filters',</div><div> 'drf_yasg',</div><div> 'rest_framework',</div><div> 'pulpcore.app',</div><div> 'pulp_rpm.app.PulpRpmPluginAppConfig',</div><div> 'pulp_file.app.PulpFilePluginAppConfig']</div><div>INSTALLED_PULP_PLUGINS<list> ['pulp_rpm', 'pulp_file']</div><div>OPTIONAL_APPS<list> ['crispy_forms', 'django_extensions', 'storages']</div><div>MIDDLEWARE<list> ['django.middleware.security.SecurityMiddleware',</div><div> 'whitenoise.middleware.WhiteNoiseMiddleware',</div><div> 'django.contrib.sessions.middleware.SessionMiddleware',</div><div> 'django.middleware.common.CommonMiddleware',</div><div> 'django.middleware.csrf.CsrfViewMiddleware',</div><div> 'django.contrib.auth.middleware.AuthenticationMiddleware',</div><div> 'django.contrib.messages.middleware.MessageMiddleware',</div><div> 'django.middleware.clickjacking.XFrameOptionsMiddleware']</div><div>AUTHENTICATION_BACKENDS<list> ['pulpcore.app.authentication.PulpNoCreateRemoteUserBackend']</div><div>ROOT_URLCONF<str> 'pulpcore.app.urls'</div><div>TEMPLATES<list> [{'APP_DIRS': True,</div><div>  'BACKEND': 'django.template.backends.django.DjangoTemplates',</div><div>  'DIRS': ['/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/pulpcore/app/templates'],</div><div>  'OPTIONS': {'context_processors': ['django.template.context_processors.debug',</div><div>                                     'django.template.context_processors.request',</div><div>                                     'django.contrib.auth.context_processors.auth',</div><div>                                     'django.contrib.messages.context_processors.messages']}}]</div><div>WSGI_APPLICATION<str> 'pulpcore.app.wsgi.application'</div><div>REST_FRAMEWORK<dict> {'DEFAULT_AUTHENTICATION_CLASSES': ['rest_framework.authentication.SessionAuthentication',</div><div>                                    'pulpcore.app.authentication.PulpRemoteUserAuthentication'],</div><div> 'DEFAULT_FILTER_BACKENDS': ['django_filters.rest_framework.DjangoFilterBackend'],</div><div> 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',</div><div> 'DEFAULT_PERMISSION_CLASSES': ['rest_framework.permissions.IsAuthenticated'],</div><div> 'DEFAULT_VERSIONING_CLASS': 'rest_framework.versioning.URLPathVersioning',</div><div> 'PAGE_SIZE': 100,</div><div> 'UPLOADED_FILES_USE_URL': False,</div><div> 'URL_FIELD_NAME': 'pulp_href'}</div><div>AUTH_PASSWORD_VALIDATORS<list> [{'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator'},</div><div> {'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator'},</div><div> {'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator'},</div><div> {'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator'}]</div><div>LANGUAGE_CODE<str> 'en-us'</div><div>TIME_ZONE<str> 'UTC'</div><div>USE_I18N<list> ['USE_I18N', True]</div><div>USE_L10N<bool> True</div><div>USE_TZ<bool> True</div><div>STATIC_URL<str> '/static/'</div><div>DATABASES<dict> {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2',</div><div>             'HOST': 'localhost',</div><div>             'NAME': 'pulp',</div><div>             'PASSWORD': 'pulp',</div><div>             'PORT': 5432,</div><div>             'USER': 'pulp'}}</div><div>LOGGING<dict> {'disable_existing_loggers': False,</div><div> 'formatters': {'simple': {'format': 'pulp: %(name)s:%(levelname)s: '</div><div>                                     '%(message)s'}},</div><div> 'handlers': {'console': {'class': 'logging.StreamHandler',</div><div>                          'formatter': 'simple'}},</div><div> 'loggers': {'': {'handlers': ['console'], 'level': 'INFO'}},</div><div> 'version': 1}</div><div>CONTENT_PATH_PREFIX<str> '/pulp/content/'</div><div>CONTENT_APP_TTL<int> 120</div><div>REMOTE_USER_ENVIRON_NAME<str> 'HTTP_REMOTE_USER'</div><div>ALLOWED_IMPORT_PATHS<list> []</div><div>PROFILE_STAGES_API<bool> False</div><div>SWAGGER_SETTINGS<dict> {'DEFAULT_AUTO_SCHEMA_CLASS': 'pulpcore.app.openapigenerator.PulpAutoSchema',</div><div> 'DEFAULT_GENERATOR_CLASS': 'pulpcore.app.openapigenerator.PulpOpenAPISchemaGenerator',</div><div> 'DEFAULT_INFO': 'pulpcore.app.urls.api_info'}</div><div>REDOC_SETTINGS<dict> {'SPEC_URL': '/pulp/api/v3/docs/?format=openapi&include_html=1'}</div><div>CONTENT_ORIGIN<str> '<a spellcheck="false"bbg-destination="rte:bind" class="" href="http://myhost.bloomberg.com" data-destination="rte:bind">http://myhost.bloomberg.com</a>'</div><div>SETTINGS<str> '/etc/pulp/settings.py'</div><div><br></div><div><div>Here is the log. gunicorn seems take the remote_user</div><div>Apr 22 09:18:58 ip-1-76-158-49 gunicorn[12150]: pulp: django.request:WARNING: Forbidden: /pulp/api/v3/remotes/rpm/rpm/</div><div>Apr 22 09:18:58 ip-1-76-158-49 gunicorn[12150]: 127.0.0.1 - bli4 [22/Apr/2020:13:18:58 +0000] "GET /pulp/api/v3/remotes/rpm/rpm/ HTTP/1.0" 403 58 "-" "HTTPie/0.9.4"</div><div>Apr 22 09:19:01 ip-1-76-158-49 systemd[1]: Created slice User Slice of root.</div><div>Apr 22 09:19:01 ip-1-76-158-49 systemd[1]: Started Session 324743 of user root.</div><div>Apr 22 09:19:01 ip-1-76-158-49 systemd[1]: Removed slice User Slice of root.</div><div>Apr 22 09:19:05 ip-1-76-158-49 gunicorn[12150]: 127.0.0.1 - bli4 [22/Apr/2020:13:19:05 +0000] "GET /pulp/api/v3/status/ HTTP/1.0" 200 1178 "-" "HTTPie/0.9.4"</div><div><br></div></div><div><br></div><div><br><br><div style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";"><div><div><div>From: <a spellcheck="false" bbg-destination="mailto:rte:bind"class="" href="mailto:dkliban@redhat.com" data-destination="mailto:rte:bind">dkliban@redhat.com</a> At: 04/22/20 09:24:47</div>To: <a spellcheck="false" bbg-destination="mailto:bli111@bloomberg.net" class="" href="mailto:bli111@bloomberg.net" data-destination="mailto:bli111@bloomberg.net"> Bin Li (BLOOMBERG/ 120 PARK ) </a><br>Cc: <a spellcheck="false"bbg-destination="mailto:pulp-list@redhat.com" class="" href="mailto:pulp-list@redhat.com" data-destination="mailto:pulp-list@redhat.com"> pulp-list@redhat.com</a><br>Subject: Re: [Pulp-list] pulpcore-client 3.2 ldap authentication</div><br></div><div style="background: none 0% 0% repeat scroll white; color: black; font-family: Arial, "BB.Proportional"; font-size: small; white-space: normal;"><div><blockquote><div dir="ltr"><div>Could you please share your settings by running the following commands on your Pulp server:<br></div><div><br></div><div>export DJANGO_SETTINGS_MODULE=pulpcore.app.settings</div><div>export PULP_SETTINGS=/etc/pulp/settings.py (or wherever your settings are)</div><div>dynaconf list</div><div><br></div><div>Don't forget to obfuscate any settings you don't want to share. <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 22, 2020 at 9:15 AM Bin Li (BLOOMBERG/ 120 PARK) <<a spellcheck="false"bbg-destination="mailto:rte:bind" class="" href="mailto:bli111@bloomberg.net" data-destination="mailto:rte:bind">bli111@bloomberg.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; white-space: pre-wrap;"><div><br></div>Thank Dennis. This fixes the issue restarting pulp. With my LDAP credential, now I can<div>http -a id:pwd GET localhost/pulp/api/v3/status/ but getting "Authentication credentials were not provided" for all other uri /remtes/rpm/rpm/. It looks like pulp is not using external authentication and still need its own authentication somehow.</div><div><br><br><div style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";"><div><div><div>From: <a spellcheck="false" bbg-destination="mailto:rte:bind"class="" href="mailto:dkliban@redhat.com" data-destination="mailto:rte:bind">dkliban@redhat.com</a> At: 04/22/20 06:52:35</div>To: <a spellcheck="false" bbg-destination="mailto:bli111@bloomberg.net" class="" href="mailto:bli111@bloomberg.net" data-destination="mailto:bli111@bloomberg.net"> Bin Li (BLOOMBERG/ 120 PARK ) </a><br>Cc: <a spellcheck="false"bbg-destination="mailto:pulp-list@redhat.com" class="" href="mailto:pulp-list@redhat.com" data-destination="mailto:pulp-list@redhat.com"> pulp-list@redhat.com</a><br>Subject: Re: [Pulp-list] pulpcore-client 3.2 ldap authentication</div><br></div><div style="background: none 0% 0% repeat scroll white; color: black; font-family: Arial, "BB.Proportional"; font-size: small; white-space: normal;"><div><blockquote><div dir="ltr"><div>You need to replace<br></div><div><br></div><div>REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES'] =</div><div><br></div><div>with <br></div><div><br></div><div>REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 21, 2020 at 10:09 PM Bin Li (BLOOMBERG/ 120 PARK) <<a spellcheck="false"bbg-destination="mailto:rte:bind" class="" href="mailto:bli111@bloomberg.net" data-destination="mailto:rte:bind">bli111@bloomberg.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; white-space: pre-wrap;"><div>This setting actually failed to restart pulp. See errors below.</div><div><br></div>Apr 21 21:56:27 ip-1-76-158-49 gunicorn[24414]: NameError: name 'REST_FRAMEWORK' is not defined<div>Apr 21 21:56:27 ip-1-76-158-49 gunicorn[24414]: [2020-04-21 21:56:27 -0400] [24417] [INFO] Worker exiting (pid: 24417)</div><div>Apr 21 21:56:27 ip-1-76-158-49 gunicorn[24414]: [2020-04-21 21:56:27 -0400] [24414] [INFO] Shutting down: Master</div><div>Apr 21 21:56:27 ip-1-76-158-49 gunicorn[24414]: [2020-04-21 21:56:27 -0400] [24414] [INFO] Reason: Worker failed to boot.</div><div>Apr 21 21:56:27 ip-1-76-158-49 systemd[1]: pulpcore-api.service: main process exited, code=exited, status=3/NOTIMPLEMENTED</div><div>Apr 21 21:56:27 ip-1-76-158-49 systemd[1]: Unit pulpcore-api.service entered failed state.</div><div>Apr 21 21:56:27 ip-1-76-158-49 systemd[1]: pulpcore-api.service failed.</div><div>Apr 21 21:56:27 ip-1-76-158-49 systemd[1]: pulpcore-resource-manager.service holdoff time over, scheduling restart.</div><div><br><div style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";"><br><div><div>From: Bin Li (BLOOMBERG/ 120 PARK) At: 04/21/20 21:32:49</div>To: <a spellcheck="false" bbg-destination="mailto:dkliban@redhat.com" class="" href="mailto:dkliban@redhat.com" data-destination="mailto:dkliban@redhat.com"> dkliban@redhat.com</a><br>Cc: <a spellcheck="false"bbg-destination="mailto:pulp-list@redhat.com" class="" href="mailto:pulp-list@redhat.com" data-destination="mailto:pulp-list@redhat.com"> pulp-list@redhat.com</a><br>Subject: Re: [Pulp-list] pulpcore-client 3.2 ldap authentication</div><br><div style="white-space: pre-wrap; font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";">Yes, I did<div># pip list |grep dynaconf</div><div>dynaconf                        3.0.0rc1    </div><div><br><br><div style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";"><div><div><div>From: <a spellcheck="false" bbg-destination="mailto:rte:bind"class="" href="mailto:dkliban@redhat.com" data-destination="mailto:rte:bind">dkliban@redhat.com</a> At: 04/21/20 20:01:00</div>To: <a spellcheck="false" bbg-destination="mailto:bli111@bloomberg.net" class="" href="mailto:bli111@bloomberg.net" data-destination="mailto:bli111@bloomberg.net"> Bin Li (BLOOMBERG/ 120 PARK ) </a><br>Cc: <a spellcheck="false"bbg-destination="mailto:pulp-list@redhat.com" class="" href="mailto:pulp-list@redhat.com" data-destination="mailto:pulp-list@redhat.com"> pulp-list@redhat.com</a><br>Subject: Re: [Pulp-list] pulpcore-client 3.2 ldap authentication</div><br></div><div style="background: none 0% 0% repeat scroll white; color: black; font-family: Arial, "BB.Proportional"; font-size: small; white-space: normal;"><div><blockquote><div dir="ltr"><div dir="ltr">Did you update dynaconf to 3.0.0rc1? There was a bug that caused the settings to get merged instead of overwritten.<br></div><div><br><div>[0] <a spellcheck="false" bbg-destination="rte:bind" class=""href="https://pulp.plan.io/issues/6244" data-destination="rte:bind">https://pulp.plan.io/issues/6244</a></div><div>[1] <a spellcheck="false" bbg-destination="rte:bind" class=""href="https://pypi.org/project/dynaconf/3.0.0rc1/"data-destination="rte:bind">https://pypi.org/project/dynaconf/3.0.0rc1/</a></div><div><br></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 21, 2020 at 5:59 PM Bin Li (BLOOMBERG/ 120 PARK) <<a spellcheck="false"bbg-destination="mailto:rte:bind" class="" href="mailto:bli111@bloomberg.net" data-destination="mailto:rte:bind">bli111@bloomberg.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; white-space: pre-wrap;"><div>I have followed the setup <a spellcheck="false"bbg-destination="rte:bind" class="" href="https://www.nginx.com/blog/nginx-plus-authenticate-users/"data-destination="rte:bind">https://www.nginx.com/blog/nginx-plus-authenticate-users/</a>  to setup nginx LDAP authentication. </div><div><br></div><div>This command works "http -a admin:password GET localhost/pulp/api/v3/repositories/rpm/rpm/ Cookie:nginxauth=XXXXXXX". The Cookie is the base64 encoded ldap username and password.</div><div><br></div><div>I assume I should follow the below so I don't have to specify admin:pwd</div><a spellcheck="false" bbg-destination="rte:bind" class="" href="https://docs.pulpproject.org/installation/authentication.html#webserver-auth-with-reverse-proxy"data-destination="rte:bind">https://docs.pulpproject.org/installation/authentication.html#webserver-auth-with-reverse-proxy</a><div style="color:rgb(83,178,245)"><br style="color:rgb(83,178,245)"></div><div>Adding the below to settings.py doesn't seem to work.</div><div>REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER'</div><div>AUTHENTICATION_BACKENDS = ['pulpcore.app.authentication.PulpNoCreateRemoteUserBackend']</div><div>REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES'] = (</div><div>    'rest_framework.authentication.SessionAuthentication',</div><div>    'pulpcore.app.authentication.PulpRemoteUserAuthentication'</div><div><br>I am a little confused what need to be added for this setup. </div><div style="color:rgb(128,128,128)">nginx <span style="color:rgb(190,190,190)"><---</span>http<span style="color:rgb(190,190,190)">---></span> gunicorn <span style="color:rgb(190,190,190)"><----</span>WSGI<span style="color:rgb(190,190,190)">----></span> pulpcore<span style="color:rgb(190,190,190)">.</span>app<span style="color:rgb(190,190,190)">.</span>wsgi application</div><div><div style="color:rgb(128,128,128)"><br style="color:rgb(190,190,190)"></div><div style="color:rgb(128,128,128)">Please advise</div><div style="color:rgb(128,128,128)">Thanks</div><div style="color:rgb(128,128,128)"><br style="color:rgb(190,190,190)"></div><div style="color:rgb(128,128,128)"><br style="color:rgb(190,190,190)"></div><div style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";"><div><div><div>From: <a spellcheck="false" bbg-destination="mailto:rte:bind"class="" href="mailto:dkliban@redhat.com" data-destination="mailto:rte:bind">dkliban@redhat.com</a> At: 04/17/20 10:45:31</div>To: <a spellcheck="false" bbg-destination="mailto:bli111@bloomberg.net" class="" href="mailto:bli111@bloomberg.net" data-destination="mailto:bli111@bloomberg.net"> Bin Li (BLOOMBERG/ 120 PARK ) </a><br>Cc: <a spellcheck="false"bbg-destination="mailto:pulp-list@redhat.com" class="" href="mailto:pulp-list@redhat.com" data-destination="mailto:pulp-list@redhat.com"> pulp-list@redhat.com</a><br>Subject: Re: [Pulp-list] pulpcore-client 3.2 ldap authentication</div><br></div><div style="background: none 0% 0% repeat scroll white; color: black; font-family: Arial, "BB.Proportional"; font-size: small; white-space: normal;"><div><blockquote><div dir="ltr">Theoretically you should be able to use pulpcore-client even with LDAP authentication in the web server. However, I have not tested this. I've only helped users that use certificate authentication in the webserver. What error are you seeing on the client side? Do you see any errors in pulp logs?<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 17, 2020 at 10:20 AM Bin Li (BLOOMBERG/ 120 PARK) <<a spellcheck="false"bbg-destination="mailto:rte:bind" class="" href="mailto:bli111@bloomberg.net" data-destination="mailto:rte:bind">bli111@bloomberg.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; white-space: pre-wrap;">Thanks Dennis. <div><br></div><div>We use pulpcore python client to interact with api. Once we enable ldap on nginx, the below code that pulpcore-client authenticate will not work any more. I am wonder if we are still be able to use pulpcore-client? or we have to rewrite the client code. This sounds too much work for us for now.</div><div>configuration = pulpcore.Configuration()</div><div>configuration.host = '<a spellcheck="false" bbg-destination="rte:bind" class="" href="http://localhost" data-destination="rte:bind">http://localhost</a>'</div><div>configuration.username = 'admin'</div><div>configuration.password = 'pwd'</div><div>rpm_client = pulp_rpm.ApiClient(configuration)<br><div><br><div style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth";"><div><div><div>From: <a spellcheck="false" bbg-destination="mailto:rte:bind"class="" href="mailto:dkliban@redhat.com" data-destination="mailto:rte:bind">dkliban@redhat.com</a> At: 04/16/20 08:38:38</div>To: <a spellcheck="false" bbg-destination="mailto:bli111@bloomberg.net" class="" href="mailto:bli111@bloomberg.net" data-destination="mailto:bli111@bloomberg.net"> Bin Li (BLOOMBERG/ 120 PARK ) </a><br>Cc: <a spellcheck="false"bbg-destination="mailto:pulp-list@redhat.com" class="" href="mailto:pulp-list@redhat.com" data-destination="mailto:pulp-list@redhat.com"> pulp-list@redhat.com</a><br>Subject: Re: [Pulp-list] pulpcore-client 3.2 ldap authentication</div><br></div><div style="background: none 0% 0% repeat scroll white; color: black; font-family: Arial, "BB.Proportional"; font-size: small; white-space: normal;"><div><blockquote><div dir="ltr"><div>Please be aware that there is a bug in dynaconf 2.2 with how settings are merged[0]. I recommend upgrading it to dynaconf 3.0.0rc1 for best results when configuring authentication backends in pulp.</div><div><br></div><div>[0] <a spellcheck="false" bbg-destination="rte:bind" class=""href="https://pulp.plan.io/issues/6244" data-destination="rte:bind">https://pulp.plan.io/issues/6244</a></div><div>[1] <a spellcheck="false" bbg-destination="rte:bind" class=""href="https://pypi.org/project/dynaconf/3.0.0rc1/"data-destination="rte:bind">https://pypi.org/project/dynaconf/3.0.0rc1/</a></div><div><br> </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 15, 2020 at 7:02 PM Dennis Kliban <<a spellcheck="false"bbg-destination="mailto:rte:bind" class="" href="mailto:dkliban@redhat.com" data-destination="mailto:rte:bind">dkliban@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Pulp 3 does not currently support multiple users. We are planning to add support for RBAC in the near future. However, I don't have a concrete timeline for that. With all that said, you still can configure the web server to perform authentication[0]. In this case Pulp will stop performing authentication and will simply look for a WSGI environment variable that contains the username.<br></div><div><br></div><div>[0] <a spellcheck="false" bbg-destination="rte:bind" class=""href="https://docs.pulpproject.org/installation/authentication.html#webserver-auth"data-destination="rte:bind">https://docs.pulpproject.org/installation/authentication.html#webserver-auth</a></div><div>[1] <a spellcheck="false" bbg-destination="rte:bind" class=""href="https://docs.pulpproject.org/settings.html?highlight=remote_user#remote-user-environ-name"data-destination="rte:bind">https://docs.pulpproject.org/settings.html?highlight=remote_user#remote-user-environ-name</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 15, 2020 at 3:19 PM Bin Li (BLOOMBERG/ 120 PARK) <<a spellcheck="false"bbg-destination="mailto:rte:bind" class="" href="mailto:bli111@bloomberg.net" data-destination="mailto:rte:bind">bli111@bloomberg.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size: small; font-family: "Courier New", Courier, "BB.FixedWidth"; white-space: pre-wrap;"><div><br></div><div>I am thinking to configure nginx with ldap authentication, but I couldn't find a way to interact with the api. Does pulpcore-client work with ldap authentication? Has anyone made httpie work with ldap?</div><div><br></div><div>Thanks</div></div>_______________________________________________<br>Pulp-list mailing list<br><a spellcheck="false"bbg-destination="mailto:rte:bind" class="" href="mailto:Pulp-list@redhat.com" data-destination="mailto:rte:bind">Pulp-list@redhat.com</a><br><a spellcheck="false"bbg-destination="rte:bind" class="" href="https://www.redhat.com/mailman/listinfo/pulp-list"data-destination="rte:bind">https://www.redhat.com/mailman/listinfo/pulp-list</a></blockquote></div></blockquote></div></blockquote><br></div></div></div></div></div></div></blockquote></div></blockquote><br></div></div></div></div></div></blockquote></div></div></blockquote><br></div></div></div></div></div></div></div></div></blockquote></div></blockquote><br></div></div></div></div></div></blockquote></div></blockquote><br></div></div></div></div></div></blockquote></div></blockquote><br></div></div></div></div></div></div></body></html>