<div dir="ltr">I've confirmed that I am able to connect on port 24817 using the hostname.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 2, 2019 at 1:28 PM Dennis Kliban <<a href="mailto:dkliban@redhat.com">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">I just realized that the example I provided was using the reverse proxy to access the REST API on port 80. This is not exactly the same as whatyou are trying to do. I'll try accessing pulp-api on port 24817 directly.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 2, 2019 at 1:01 PM Dennis Kliban <<a href="mailto:dkliban@redhat.com" target="_blank">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>How are you specifying the credentials? Are you sure the credentials being sent with the request are correct?</div><div><br></div><div>I just tested that I could create a .netrc file with the following content on a host other than pulp:</div><div><br></div><div>machine <a href="http://pulp3-source-fedora30.localhost.example.com" target="_blank">pulp3-source-fedora30.localhost.example.com</a><br>login admin<br>password password</div><div><br></div><div>and I was able to successfully execute from that same host:</div><div><br></div><div>http <a href="http://pulp3-source-fedora30.localhost.example.com/pulp/api/v3/repositories/" target="_blank">http://pulp3-source-fedora30.localhost.example.com/pulp/api/v3/repositories/</a></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 2, 2019 at 11:23 AM Bin Li (BLOOMBERG/ 120 PARK) <<a href="mailto:bli111@bloomberg.net" target="_blank">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><div style="white-space:pre-wrap;font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth"">Updated /etc/pulp/settings.py to use ALLOWED_HOSTS = ['*'] and restarted all services. Still getting 403 errors.<div>Also tried adding PULP_ALLOWED_HOSTS to /etc/systemd/system/multi-user.target.wants/pulp-api.service and replacing localhost with 0.0.0.0 as below</div><div>Environment=PULP_ALLOWED_HOSTS="['*']"</div><div>ExecStart=/usr/local/lib/pulp/bin/gunicorn pulpcore.app.wsgi:application \</div><div>          --bind '<a href="http://0.0.0.0:24817" target="_blank">0.0.0.0:24817</a>' \</div><div><div>--access-logfile</div><div><br></div><div>The problem persists.</div><div><br><br><div style="font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth""><div><div><div>From: <a href="mailto:brocha@redhat.com" target="_blank">brocha@redhat.com</a> At: 10/02/19 10:37:17</div>To: <a href="mailto:bli111@bloomberg.net" target="_blank"> Bin Li (BLOOMBERG/ 120 PARK ) </a><br>Cc: <a href="mailto:mikedep333@redhat.com" target="_blank"> mikedep333@redhat.com</a>, <a href="mailto:pulp-list@redhat.com" target="_blank"> pulp-list@redhat.com</a><br>Subject: Re: [Pulp-list] Access Pulp 3 Api from a remote machine</div><br></div><div style="background:white none repeat scroll 0% 0%;color:black;font-family:Arial,"BB.Proportional";font-size:small;white-space:normal"><div><blockquote><div dir="ltr"><div><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>We do have ALLOWED_HOSTS = '*' in /etc/pulp/settings.py</div></blockquote><div><br></div><div>This variable must be a list, not sure if that is the problem.</div><div><br></div><div><font size="4"><span style="font-family:monospace">ALLOWED_HOSTS = ['*']</span></font></div><div><br></div><div>As environment variable it would be <span style="font-family:monospace">export PULP_ALLOWED_HOSTS="['*']"</span><br></div><div><br></div><div><a href="https://docs.djangoproject.com/en/2.2/ref/settings/#allowed-hosts" target="_blank">https://docs.djangoproject.com/en/2.2/ref/settings/#allowed-hosts</a></div><div><br></div></div></blockquote><br></div></div></div></div></div></div></div>_______________________________________________<br>
Pulp-list mailing list<br>
<a href="mailto:Pulp-list@redhat.com" target="_blank">Pulp-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-list" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-list</a></blockquote></div>
</blockquote></div>
</blockquote></div>