ASP.NET change logged-in user using Windows Auth without logging off PC? - asp.net-membership

How do I change who is logged in (allow for another user to login) to an application that is using Windows Authentication without having the PC user log off?

You would be better served to use forms-based auth against AD with impersonation. Pass-through authentication is uneven and introduces a number of issues you don't even want to begin to deal with.

To clarify: Do you want to be logged in to Windows with one account and then be able to view a web site that uses Windows Authentication with a different user?
Maybe you can run the browser under a different account with runas.

Right-click on your browser icon, choose "Run as...", and provide the other user's credentials.

You could prevent IE (I assume) from automatically passing NTLM credentials. But then you'll get a login dialog.
You can change the "automatically login behavior" by doing the following in IE:
Tools -> Internet Options ->
Security tab -> Intranet zone (I
assume)
Then click "Custom level..." and
scroll to the bottom to User
Authentication -> Logon.
Select the "Prompt for user name and
password" option.
FF has similar options by going into "about:config" and change the "network.automatic-ntlm-auth.trusted-uris" setting.

Related

I can't enable MFA for Oracle Identity Cloud Service user

I just sign-up an account of Oracle Cloud
After I logged in, It seem the system automatically created a tenancy for me and added me to an Identity Providers named oracleidentitycloudservice.
They also create one more user starts with oracleidentitycloudservice/username.
This is identity user page, both 2 of them is me. One of them is federated with oracleidentitycloudservice which is created automatically.
I can enable MFA for the second account.
But I can not enable MFA account for oracleidentitycloudservice/username:
When I want to login to Identity Console page, I need to use this SSO method:
It seem risky if Identity Console page doesn't provide MFA feature. That's what I worry about.
Question is:
Is it safe if I delete oracleidentitycloudservice/username?
How can I enable MFA for oracleidentitycloudservice/username from Oracle Infastructure page?
If Oracle is providing a complicated way to enable MFA for oracleidentitycloudservice/username, could it be a security issue?
For those who are in the same situation, here is step to Enable MFA for Oracle Identity cloud service user:
Sign in by this SSO method at this screen:
Go to Service User Console on top-right screen
Go to Admin Console of Identity
Go to My profile on top-right screen
Go to Security tab, our goal is to give the account permissions so that MFA item shows on this screen. At this moment MFA is not yet enabled, move to next step
Go to Admin console at top-right screen
Go to Security -> MFA at left side panel, check the box Mobile App Passcode
Go to Security -> Sign-On Policies, edit the Default Policy
Edit Default Sign-on Rule
Select the option that you prefer. It's upto you.
Go to Security tab and here you can enable MFA for your IDCS account
Sign-out and Sign-in again. Now you can use MFA to login.
Here's how you enable MFA (TOTP Authenticator) for Free Tier accounts:
Navigate to https://www.oracle.com/in/cloud/sign-in.html
Enter your Cloud Account Name and click Next
Select oracleidentitycloudservice as your Identity Provider and click Continue
Enter your username and password
Click on hamburger menu and select Identity & Security > Federation
Click on OracleIdentityCloudService
Click on the link next to Oracle Identity Cloud Service Console
You should be logged into the Oracle Identity Cloud Service console. Click on the hamburger menu and select Security > MFA
I don't see a way to enable Duo Security or FIDO Authenticator at this screen. Probably because the license type is Foundation but if you found a way to enable either of those, please edit this answer. If not, enable Mobile App Passcode and Mobile App Notification and click Save
Click on the top right corner of the screen with your initials and select My Profile
Click on the Security tab and you should see a 2-Step Verification section with an Enable button.
Click on Enable and select Mobile App
Check Offline Mode or Use Another Autenticator App
Scan the QR code with your favorite TOTP app (I used Authy) and enter a code and click Verify
You'll now have a 2SV factor enabled
Go back to the console by clicking on your initials at the top right corner and selecting Admin Console
Click on the hamburger menu and navigate to Security > Sign-On Policies
Edit the Default Sign-On Policy by clicking on and selecting Edit
Click on the Sign-On Rules tab and edit the Default Sign-On Rule by clicking on and selecting Edit
Scroll down to Actions section and enable Prompt for an additional factor and leave the rest at defaults and click Save
Log out and log back in again (alternatively open the Oracle Identity Cloud Service Console URL from step 7 in a private/incognito tab) and verify that you're prompted for the TOTP code after entering your username and password.
This is already old information, OCI is constantly changing it's dashboard. If you can't find the correct screens anymore, see this Oracle Documentation page, with which I set the policy after I enabled 2FA on my profile via Security:
https://docs.oracle.com/en-us/iaas/Content/Identity/mfa/understand-multi-factor-authentication.htm?Highlight=mfa
After that 2FA is asked after you login with your credentials.
I have the same issue.
I was following an official training from Oracle and found that the option did not appear because I was using the federated user.
You may manage all the users from the the lines button at the top-left corner and from there 'Identity & Security'.
First menu Identity & Security
Once you click on that option, you will see:
Choose Users
And this is the main user's options with the MFA and password reset if required:
User's options including MFA
Dani.

Azure Portal Login automatically uses Windows Account

In Internet Explorer, when I go to any site that is authenticated via Azure AD, the login page automatically chooses to log me in with my Windows Account. This functionality would typically be great, but I need to use different credentials (my clients).
How can tell IE to NOT automatically log me into Azure AD with my windows credentials?
When I use any different browser, the expected functionality exists and I am prompted to enter the login credentials I want. Also, the solution can not be "just use a different browser". Client uses IE for everything and won't allow users to install different browsers.
I am running Windows 10.
Thanks in advance
Opening IE InPrivate window should allow you to login with any user you need.
Use Ctrl+Shift+P or Settings Icon->Safety->InPrivate Browsing.

Angular 2: automatic logon using Active Directory user

I'm developing an Angular 2 application, and one of the requirements is that the user should log in automatically (without specifying a username and password). The user should be logged on with his Windows user.
Is this possible? I know I can use Windows authentication in my Web API but I suppose there is no way of knowing the user's credentials without him specifying them manually?
Try to add your site to "Local Intranet" in
Chrome > Options > Under the Hood > Change Proxy Settings > Security (tab) > Local Intranet/Sites > Advanced.
Add you site URL here and it should work.

Connect user to MVC3 application without login form (Single Sign On)

I want to know if it's possible to connect users to my application using Active directorylogin and password but without ask the users to re-enter them.
What i actually do :(disabled anonymous auth/enabled Win auth)
1- the users poweron their desktop and enter their login and password (Active directory)
2- open the application and re-enter the same login/password (again)
I want to avoid the second step, and get the information i need from the session(the name, username...)
Is that possible ?
If the browser supports ntlm they shouldn't get prompted.
here is an article on how to do this.
Authenticating Users with Windows Authentication
For support in specific browsers search:
"ntlm firefox"
"ntlm chrome"
etc...
To get the actual users username (User.Identity.Name) you see: HttpContext.User Property
see also:
IIdentity Interface

ASP.NET MVC Debugging Session not working

I've a MCV ASP.NET. It has authentication and authorization.
When ever I run this application in debug mode, the application starts with user already logged in. It doesn't show Logon page.
Could anyone tell me how to fix this issue i.e. clear the session so that it prompts login credentials? I tried clearing cookies etc on IE and issue still exists.
are you sure it has forms authentication and not windows authentication? You can check by highlighting project name in solution explorer and press F4. Make sure that anonymous authentication is set to enabled, and Windows Authentication to Disabled.
If you indeed have forms authentication, you can have a link that invokes an action that calls FormsAuthentication.SignOut(); If you generate a basic "internet application" template, it is generated for you in account controller

Resources