# Dumb question on environment variables

**URL:** <https://www.ruby-forum.com/t/dumb-question-on-environment-variables/92548>\
**Category:** Rails\
**Created:** [April 20, 2007, 4:10pm UTC](https://www.ruby-forum.com/t/dumb-question-on-environment-variables/92548 "2007-04-20T16:10:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![seeah](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b19c9b/32.png) [@seeah](https://www.ruby-forum.com/u/seeah)\
**Post date:** [April 20, 2007, 4:10pm UTC](https://www.ruby-forum.com/t/dumb-question-on-environment-variables/92548/1 "2007-04-20T16:10:18Z")

</div>

Umm - coming from a php world in another life, I’m looking for the  
Rails equivalent of the cgi environment variables (similar to http://  
[PHP: Predefined Variables - Manual](http://fr.php.net/reserved.variables)).

Specifically, what I’m really looking for are things like AUTH\_USER  
so that I can install Rails on either IIS or a Kerberos-enabled  
Apache and take advantage of the SSO capabilites, including being  
able to automatically log them in and make decisions based on their  
username. Even knowing how to get the information of Basic  
Authentication would be a move in the right direction for me.

Cheers,

Erik

---

<div class="post-metadata">

**Author:** ![seeah](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b19c9b/32.png) [@seeah](https://www.ruby-forum.com/u/seeah)\
**Post date:** [April 20, 2007, 4:50pm UTC](https://www.ruby-forum.com/t/dumb-question-on-environment-variables/92548/2 "2007-04-20T16:50:23Z")

</div>

@Erik:

First, abandon hope if you wish to integrate with IIS 🙂 We can talk  
about  
that later.  
Some of the things you’re looking for are located in the AbstractRequest  
base class

[http://api.rubyonrails.com/classes/ActionController/AbstractRequest.html](http://api.rubyonrails.com/classes/ActionController/AbstractRequest.html)

Basic Authentication isn’t too bad either, but you actually usually make  
Rails request it directly. Take a look at the Acts\_as\_authenticated  
plugin  
[http://technoweenie.stikipad.com/plugins/show/Acts+as+Authenticated](http://technoweenie.stikipad.com/plugins/show/Acts+as+Authenticated)

There’s lots of good stuff in there that you can probably adapt. Good  
luck!

---

<div class="post-metadata">

**Author:** ![seeah](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b19c9b/32.png) [@seeah](https://www.ruby-forum.com/u/seeah)\
**Post date:** [April 20, 2007, 8:55pm UTC](https://www.ruby-forum.com/t/dumb-question-on-environment-variables/92548/3 "2007-04-20T20:55:48Z")

</div>

Le 20 avr. 07 à 16:49, Brian H. a écrit :

> First, abandon hope if you wish to integrate with IIS 🙂 We can  
> talk about that later.  
> Some of the things you’re looking for are located in the  
> AbstractRequest base class

I figured that was probably the case from what I’d found on the web.  
So in the meantime, I have a brand new Ubuntu Virtual Machine ready  
to try out the Kerberos integration 🙂

> [Peak Obsession](http://api.rubyonrails.com/classes/ActionController/)  
> AbstractRequest.html

Yeah - I looked at that one, but it’s pretty limited about the  
extended attributes, specifically auth\_user.

> Basic Authentication isn’t too bad either, but you actually usually  
> make Rails request it directly. Take a look at the  
> Acts\_as\_authenticated plugin [http://technoweenie.stikipad.com/](http://technoweenie.stikipad.com/)  
> plugins/show/Acts+as+Authenticated
> 
> There’s lots of good stuff in there that you can probably adapt.  
> Good luck!

Hmm - have to go take a peek at that one. I was under the impression  
that it was still a forms oriented authentication process that  
required local tables which is something I’m trying to avoid.

Thanks for the tips !
