I have two internet facing sites programmed in ASP.net: example.com
and site1.example.com
Each one is deployed on it's own server in different geographical locations.
site1.example.com
- Hosts a third party application
- Uses forms for windows authentication (of local windows users)
- I have full server access.
- I can only modify config/view code (I can't modify binaries)
example.com
- All custom code that I can change
- Forms authentication against database
What needs to happen is
- User logs into
example.com
- Windows credentials are retrieved from database (based on the current user logged in)
- User gets authenticated with
site1.example.com
in the background example.com
links to resource onsite1.example.com
- User is now able to access resources on
site1.example.com
I have created this hack to make it work:
- Append encrypted credentials to
site1.example.com
login url - Create hidden iFrame on
example.com
that points to special login url. - Modify
site1.example.com
login page to- decrypt login credentials
- type them into username/password box and click submit via JavaScript
What ends up happening is site1.example.com
has to load twice before it's resources can become available (once to show the login page and once after the page is submitted) which can take some time.
Is there a way to have example.com
authenticate with site1.example.com
in the background in a single request (as apposed to two requests which I am doing now)?
Impersonate Identity seems promising on the site1.example.com
side but will the code implementation of it work if I run it from a view?
Federated Identity seems like the key here but it is quite overwhelming. Can I implement it without modifying binaries on one end (examples)? Does it work with a mix of forms and windows authentication or does it just allow windows users to link up across different windows domains.
example.com
: FormsAuthentication with hashed credentials.site1.example.com
: Has different users then example.com. Uses Forms for Windows Authentication. I assume its AD – user1886419