검색 결과 :
×ASP.NET Core SAML SSO(Single Sign-On) 미들웨어는 ASP.NET 핵심 애플리케이션에 대해 SAML Single Sign-On을 활성화하는 기능을 제공합니다. Single Sign-On을 사용하면 하나의 암호만 사용하여 ASP.NET 핵심 응용 프로그램 및 서비스에 액세스할 수 있습니다. 당사의 미들웨어는 모든 SAML 준수 ID 공급자와 호환됩니다. 여기서는 Auth0을 IdP로 간주하여 ASP.NET Core와 Auth0 간에 SSO(Single Sign-On)를 구성하는 단계별 가이드를 살펴보겠습니다. ASP.NET Core SSO에 제공되는 기능에 대해 자세히 알아보려면 다음을 클릭하세요. 여기에서 지금 확인해 보세요..
using miniorange.saml public class Startup { public void ConfigureServices(IServiceCollection services) { services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(); services.AddControllersWithViews(); } public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthorization(); app.MapRazorPages(); app.UseCookiePolicy(); app.UseAuthentication(); app.UseStaticFiles(); app.UseminiOrangeSAMLSSOMiddleware(); app.Run(); } }
using Microsoft.AspNetCore.Authentication.Cookies; using miniOrange.saml; var builder = WebApplication.CreateBuilder(args); builder.Services.AddRazorPages(); // Add authentication services builder.Services.AddControllersWithViews(); builder.Services.AddAuthentication(options => { options.DefaultAuthenticateScheme = "SSO_OR_Admin"; options.DefaultScheme = "SSO_OR_Admin"; options.DefaultChallengeScheme = "SSO_OR_Admin"; }) .AddCookie("moAdmin", options => { }) .AddCookie(CookieAuthenticationDefaults.AuthenticationScheme, options => { // Configure cookie options as needed for SSO Users }) .AddPolicyScheme("SSO_OR_Admin", "SSO_OR_Admin", options => { // runs on each request options.ForwardDefaultSelector = context => { // filter by auth type, here if the moAdmin cookie is coming in any request the Admin Authentication will work foreach (var cookie in context.Request.Cookies) { if (cookie.Key.Contains(".AspNetCore.Cookies")) { return CookieAuthenticationDefaults.AuthenticationScheme; } } // otherwise always check for cookie auth return "moAdmin"; }; }); var app = builder.Build(); if (!app.Environment.IsDevelopment()) { app.UseExceptionHandler("/Error"); app.UseHsts(); } app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthorization(); app.MapRazorPages(); app.UseCookiePolicy(); app.UseAuthentication(); app.UseStaticFiles(); app.UseminiOrangeSAMLSSOMiddleware(); app.Run();
https://<your-application-base-url>/?ssoaction=config
ID 공급자 측에 구성할 SAML SP 메타데이터를 가져올 수 있는 두 가지 방법이 아래에 자세히 설명되어 있습니다.
ASP.NET Core SAML SSO를 달성하기 위해 Auth0을 SAML IdP(ID 공급자)로 성공적으로 구성했습니다.
미들웨어에서 SAML ID 공급자 메타데이터를 구성할 수 있는 두 가지 방법이 아래에 자세히 설명되어 있습니다.
string name=""; string claimtype=""; string claimvalue=""; if(User.Identity.IsAuthenticated) { foreach( var claim in User.Claims) { claimtype = claim.Type; claimvalue = claim.Value; } //retrive custom attributes(for eg. Retrieve Mapped 'mobileNumber' attribute of your IDP) var identity = (ClaimsIdentity)User.Identity; IEnumerable claims = identity.Claims; string mobileNumber = identity.FindFirst("mobileNumber")?.Value; }
https://base-url/?ssoaction=login
<a href=”https://asp-net-core-base-url/?ssoaction=login”>Log
in</a>
https://asp-net-core-base-url/?ssoaction=logout
<a href=”https://base-url/?ssoaction=logout”>Log
out</a>
IDP를 구성하려면 appsetting.json 파일에서 서비스 공급자의 메타데이터를 찾을 수 있습니다. SP 메타데이터의 경우 아래 스크린샷을 참조할 수 있습니다.
~ 미니오렌지 섹션에서 지출 ID, acsurl을 복사하여 ID 공급자 팀에 제공하세요.
idp_cert | 이 필드에 IDP 인증서를 입력하세요. |
쏘울 | 이 필드에 SSO URL을 입력하세요. |
idp_issuer | 이 필드에 IDP 발급자를 입력하세요. |
string name="";
string claimtype="";
string claimvalue="";
if(User.Identity.IsAuthenticated) {
name= User.Identity.Name;
foreach( var claim in User.Claims) {
claimtype = claim.Type;
claimValue = claim.Value;
}
}
다음과 같은 ID 공급자를 사용하여 ASP.NET Core SAML 2.0 SSO(Single Sign-On) 미들웨어를 구성할 수 있습니다. ADFS, Azure AD, Bitium, centrify, G Suite, JBoss Keycloak, Okta, OneLogin, Salesforce, AWS Cognito, OpenAM, Oracle, PingFederate, PingOne, RSA SecureID, Shibboleth-2, Shibboleth-3, SimpleSAML, WSO2 또는 심지어는 자신의 맞춤형 ID 공급자. ID 공급자 목록을 확인하세요. 여기에서 지금 확인해 보세요..
귀하의 ID 공급자를 찾을 수 없습니까? 우리에게 메일을 보내세요 aspnetsupport@xecurify.com 귀하의 IDP로 SSO를 설정하고 귀하의 요구 사항에 대한 빠른 안내(이메일/회의를 통해)를 도와드릴 것이며, 저희 팀은 귀하의 요구 사항에 따라 가장 적합한 솔루션/계획을 선택할 수 있도록 도와드릴 것입니다.
도움이 필요하다? 우리는 바로 여기에 있습니다!
본 개인 정보 보호 정책은 당사가 개인 정보를 처리하는 방법을 설명하는 미니오렌지 웹사이트에 적용됩니다. 귀하가 웹사이트를 방문하면 해당 웹사이트는 대부분 쿠키 형태로 귀하의 브라우저에 정보를 저장하거나 검색할 수 있습니다. 이 정보는 귀하, 귀하의 기본 설정 또는 귀하의 장치에 관한 것일 수 있으며 대부분 사이트가 귀하가 기대하는 대로 작동하도록 하는 데 사용됩니다. 이 정보는 귀하를 직접적으로 식별하지는 않지만 귀하에게 보다 개인화된 웹 경험을 제공할 수 있습니다. 카테고리 제목을 클릭하면 당사가 쿠키를 처리하는 방법을 확인할 수 있습니다. 당사 솔루션의 개인정보 보호정책은 다음을 참조하세요. 개인 정보 보호 정책.
필수 쿠키는 사이트 탐색, 로그인, 양식 작성 등과 같은 기본 기능을 활성화하여 웹사이트를 완벽하게 사용할 수 있도록 도와줍니다. 해당 기능에 사용되는 쿠키는 개인 식별 정보를 저장하지 않습니다. 그러나 웹사이트의 일부 부분은 쿠키 없이는 제대로 작동하지 않을 수 있습니다.
이러한 쿠키는 방문자, 소스, 페이지 클릭 및 조회수 등을 포함하여 웹사이트 트래픽에 대해 집계된 정보만 수집합니다. 이를 통해 당사는 실행 가능한 요소에 대한 사용자의 상호 작용과 함께 가장 인기 있는 페이지와 가장 인기 없는 페이지에 대해 더 많이 알 수 있으므로 이를 통해 당사는 웹사이트와 서비스의 성능을 개선합니다.