# Monitoring application protected by AuthN reverse proxy using sensu

**URL:** <https://discourse.sensu.io/t/monitoring-application-protected-by-authn-reverse-proxy-using-sensu/905>\
**Category:** Sensu Classic (EOL)\
**Created:** [August 17, 2018, 8:18pm UTC](https://discourse.sensu.io/t/monitoring-application-protected-by-authn-reverse-proxy-using-sensu/905 "2018-08-17T20:18:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harita\_Yalamanchili](https://avatars.discourse-cdn.com/v4/letter/h/dc4da7/32.png) [@Harita\_Yalamanchili](https://discourse.sensu.io/u/Harita_Yalamanchili)\
**Post date:** [August 17, 2018, 8:18pm UTC](https://discourse.sensu.io/t/monitoring-application-protected-by-authn-reverse-proxy-using-sensu/905/1 "2018-08-17T20:18:09Z")

</div>

Hi,

I went through sensu documentation and couldnt find any thing relevant. I am planning to monitor application which is behind authN reverse proxy. Is it possible to do using Sensu?

Here is the scenario :

1. When I hit [xyz.com](http://xyz.com) ,It redirects to [abc.com](http://abc.com) for authentication ,where I provided user name/Password and successfully authenticated users will be able to access the page. I need to configure Sensu in such a way that I can provide username/password along with url,so hat I get expected response code. Really appreciate ,If somebody can point me to some documentation or advise on how to get it done? Thanks in advance

---

<div class="post-metadata">

**Author:** ![majormoses](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/majormoses/32/62_2.png) [@majormoses](https://discourse.sensu.io/u/majormoses)\
**Post date:** [November 6, 2018, 4:18am UTC](https://discourse.sensu.io/t/monitoring-application-protected-by-authn-reverse-proxy-using-sensu/905/2 "2018-11-06T04:18:29Z")

</div>

So if I understand this correctly you need to connect to a URL to authenticate and grab some kind of token/cookie and then hit another URL to present this so that you will be authorized and will be able to monitor something. That’s certainly possible although I am not aware of any community plugin that does this for you. Sensu is a framework and can do anything you can write code for. I think there are two basic approaches:

- have a process that creates a token/cookie (or an out of sensu process that creates a long lived token) that you can set in a [header](https://github.com/sensu-plugins/sensu-plugins-http/blob/3.0.1/bin/check-http.rb#L101-L104) in the form of a comma seperated list of colon delimited keys and values. You could probably create a wrapper script that does the auth setup and then passes the appropriate values to the check mentioned above.
- create a new script that follows all (or limited to a specific number of) redirects and will know how to provide authentication to the auth gateway and then keep/set a required header so that the application you are monitoring will not attempt to redirect you back due to lack of auth
