开发者

way to warn developers they are on Production site

We have a web app deployed in several environments (Dev, QA, etc.) as well as Production. Ironically enough, the non-production sites have prominent开发者_StackOverflow markings saying what environment it is, but Production does not (for obvious reasons). The danger is that a developer will do something on production thinking that they are in some other environment. Of course, self-discipline is your friend here (close Prod as soon as you're done) but is there anything systematic we can put in place to help us out that will not affect the user experience in Prod?


Promoted to answer, from comment:

Don't allow developers on the production systems This is not a joke answer. if you have dev/qa/etc. machines, it should be extremely unusual for a developer to be on production. So unusual that they will 'quake in fear' when they are on production boxes. I've done this for > 25 years, and I still get that fear. (it's a good thing)


.NET

Check the requester's IP address and see if it falls within your private subnet.

if (Request.UserHostAddress.StartsWith("192.168.1."))
{
    // show control
}


.NET with machines in an AD domain

Check the requester's host name and see if it ends with your internal domain name.

if (System.Net.Dns.GetHostEntry(Request.UserHostAddress).HostName.EndsWith(".myIntenalDomain.local"))
{
    // show control
}


I agree with 'close prod as soon as your done with it'. However there are cases where developers are constantly requiring access to prod servers. If you are that worried then force developers to use a specific machine (other than their own) to make changes to prod. This gives a physical cue since they have to change machines that they better be careful.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜