question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

REMOTE_USER support

See original GitHub issue

The CGI RFC provides for a REMOTE_USER variable, which holds the username of the user who has been authenticated by the front-end Web server. For a WSGI application, this can be obtained as environ["REMOTE_USER"], since a WSGI application gets access to all CGI variables. It would be nice if an ASGI application could get access to the same thing.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:27 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
andrewgodwincommented, Jun 14, 2020

Yeah, my point about REMOTE_USER still mostly stands - it’s something that was tacked onto CGI because you can just pass arbitrary environment variables, and I’m not convinced it needs its own special ASGI key; I see very, very few applications that use REMOTE_USER these days as opposed to OAuth, SAML or similar, and even the proxies for those have to use headers, not CGI-style variables.

Given that, I’m not super sure we need it in there. SCRIPT_NAME is already tackled with prefix, since that is important enough to warrant one.

I’m not hardline on this - I just haven’t seen REMOTE_USER pop up in most open source things for a while. Do you have a set of use cases that it fits?

1reaction
andrewgodwincommented, Sep 18, 2019

I agree this could happen in principle, but given that it’s very unlikely that ASGI would run under CGI (it would defeat the entire point), I’d rather not over-specify and include this for now, and instead suggest it’s passed on as a header instead if needed. This then matches with how authenticating reverse-proxies would have to do the same thing, and that’s a far more common scenario with modern Python deploys.

Read more comments on GitHub >

github_iconTop Results From Across the Web

12 Best Remote IT Support Tools in the Work-From-Home Era
The Best Remote IT Support Tools · RemotePC · ZohoAssist · BeyondTrust · ConnectWise Control · Parallels RAS · Amazon WorkSpaces · GoToMyPC...
Read more >
Best Remote Support Software in 2022 - G2
Top Remote Support Software. Choose the right Remote Support Software using real-time, up-to-date product reviews from 9648 verified user reviews.
Read more >
Best Remote Support Software - 2023 Reviews & Pricing
Find the best remote support software for your business. Read user reviews of leading systems. Free comparisons, demos and price ...
Read more >
Best Remote Support Software 2022 | Reviews of the Most ...
Find and compare top Remote Support software on Capterra, with our free and interactive tool. Quickly browse through hundreds of Remote Support tools...
Read more >
Free Remote Support Software - Zoho Assist
Zoho Assist empowers businesses across the globe with secure cloud-based remote support and remote access software to deliver top-notch customer support ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found