Skip to main content
BeRadB
Inspiring
January 8, 2020
Question

docker cold fusion 2018 cgi scope

  • January 8, 2020
  • 1 reply
  • 1227 views

I just stood up my first docker image on my local computer, and have the app working next to the CGI variables I need. How do I get those when I hit the web page of the user hitting the web page. CGI.Auth_user in particular?

 

This topic has been closed for replies.

1 reply

Charlie Arehart
Community Expert
Community Expert
January 8, 2020

You'll need to provide us more info. Many of the CGI vars (like that one) are actually controlled by the web server that fronts CF. What are you using?

 

By default, the CF Docker images run your traffic through the built-in web server within CF (port 8500). You may be using that (you'd know, based on whethr you exposed that port in your docker run or compose file, or other orchestration config).

 

Or you could well have implemented some web server like nginx or apache, or even IIS, whether within a container also or on your host (talking to the container).

 

Whichever web server you are using, you would then have to have enabled security for the web site in question, since you're expecting to see cgi.auth_user variable to be populated . What form of security did you enable in teh web server you're using? 

 

Or might it be that you did not enable any other web server, and are just using "the one in the CF docker image". In that case, it has no such web site security enabled, by default. So you should not expect to see that variable populated. If it's simply that it's blank, it should be, so you should change your code to work accordingly.

 

Or enable security within whichever web server you are using to talk to the CF container.

 

Let us know what you think.

/Charlie (troubleshooter, carehart. org)
BeRadB
BeRadBAuthor
Inspiring
January 8, 2020

Thanks Charlie ,

I'm using what comes default in docker, no iis or apache. currently, I'm only using docker on my local desktop to test and dev with. I have a way to fudge the nt username for now. I didn't know I had another step to take to get the cgi vars, in ye olden days I just turned in iis I just turned on the windows authentication method. Moving forward I believe that the prod environment won't be windows and i don't know what I would need to do to get that going.  do you know of a resource i can look at that might help to get started with that?

 

by the way, caught a few of your sessions at the 2019 CF summit, good stuff, learned a lot!

 

Iambradb.com Adobe ColdFusion Specialist.
Charlie Arehart
Community Expert
Community Expert
January 10, 2020

It sounds like you may need to configure the RemoteIpValve in Tomcat to let it know that the request was proxied over a secure transport: https://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#Remote_IP_Valve 

 

Pete Freitag

Foundeo Inc.


Pete, can you share how beradb's request is being proxied over a secure transport? Did I miss something, or have guys perhaps shared info outside of this thread, like slack, twitter, or fb?

 

If that's not it, can you clarify for readers how you might be supposing it's happening? Thx. 

/Charlie (troubleshooter, carehart. org)