Google Authenticator를 사용하여 Umbraco 2FA를 구성합니다.
회사 개요
Umbraco 2단계 인증(2FA)은 Google Authenticator를 활성화하여 Umbraco 애플리케이션 로그인 에 추가적인 보안 계층을 제공합니다 . 사용자는 올바른 사용자 이름과 비밀번호를 입력한 후 Google Authenticator 앱에서 생성된 시간 제한 암호를 입력해야 합니다. Google Authenticator는 피싱, 무차별 대입 공격 및 무단 액세스로부터 사용자 계정을 보호하는 데 도움이 되는 신뢰할 수 있는 2단계 인증 방법입니다. 이 플러그인은 Microsoft Authenticator, Duo Authenticator, SMS를 통한 OTP 및 이메일을 통한 OTP와 같은 다른 인증 방법도 지원합니다.
2단계 인증(2FA)을 구성하려면 Umbraco 버전을 선택하세요.
전제조건 : 다운로드 및 설치
- Umbraco 2단계 인증(2FA) 플러그인을 다운로드하세요.
- Umbraco 2FA 플러그인을 설정하려면 아래 네임스페이스, 서비스 및 미들웨어를 추가하십시오. 프로그램.cs 파일입니다. 아래에 예시가 있습니다.
아래 강조 표시된 부분만 포함하세요. 프로그램.cs 귀하의 응용 프로그램 파일.
using miniorange.aspnet.tfa;
using System.Reflection;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.Services.AddDistributedMemoryCache();
builder.Services.AddSession(options =>
{
options.IdleTimeout = TimeSpan.FromMinutes(60);
options.Cookie.HttpOnly = true;
options.Cookie.IsEssential = true;
});
builder.Services.AddminiOrangeServices(Assembly.GetExecutingAssembly());
builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddDeliveryApi()
.AddComposers()
.Build();
WebApplication app = builder.Build();
await app.BootUmbracoAsync();
app.UseSession();
app.UseMiddleware<RedirectAfterLoginMiddleware>();
app.UseStateCheck();
app.UseUmbraco()
.WithMiddleware(u =>
{
u.UseBackOffice();
u.UseWebsite();
})
.WithEndpoints(u =>
{
u.UseInstallerEndpoints();
u.UseBackOfficeEndpoints();
u.UseWebsiteEndpoints();
});
await app.RunAsync();
using miniorange.aspnet.tfa;
using System.Reflection;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.Services.AddDistributedMemoryCache();
builder.Services.AddSession(options =>
{
options.IdleTimeout = TimeSpan.FromMinutes(60);
options.Cookie.HttpOnly = true;
options.Cookie.IsEssential = true;
});
builder.Services.AddminiOrangeServices(Assembly.GetExecutingAssembly());
builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddDeliveryApi()
.AddComposers()
.Build();
WebApplication app = builder.Build();
await app.BootUmbracoAsync();
app.UseSession();
app.UseMiddleware<RedirectAfterLoginMiddleware>();
app.UseStateCheck();
app.UseUmbraco()
.WithMiddleware(u =>
{
u.UseBackOffice();
u.UseWebsite();
})
.WithEndpoints(u =>
{
u.UseInstallerEndpoints();
u.UseBackOfficeEndpoints();
u.UseWebsiteEndpoints();
});
await app.RunAsync();
using miniorange.aspnet.tfa;
using System.Reflection;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.Services.AddDistributedMemoryCache();
builder.Services.AddSession(options =>
{
options.IdleTimeout = TimeSpan.FromMinutes(60);
options.Cookie.HttpOnly = true;
options.Cookie.IsEssential = true;
});
builder.Services.AddminiOrangeServices(Assembly.GetExecutingAssembly());
builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddDeliveryApi()
.AddComposers()
.Build();
WebApplication app = builder.Build();
await app.BootUmbracoAsync();
app.UseSession();
app.UseMiddleware<RedirectAfterLoginMiddleware>();
app.UseStateCheck();
app.UseUmbraco()
.WithMiddleware(u =>
{
u.UseBackOffice();
u.UseWebsite();
})
.WithEndpoints(u =>
{
u.UseInstallerEndpoints();
u.UseBackOfficeEndpoints();
u.UseWebsiteEndpoints();
});
await app.RunAsync();
using miniorange.aspnet.tfa;
using System.Reflection;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.Services.AddDistributedMemoryCache();
builder.Services.AddSession(options =>
{
options.IdleTimeout = TimeSpan.FromMinutes(60);
options.Cookie.HttpOnly = true;
options.Cookie.IsEssential = true;
});
builder.Services.AddminiOrangeServices(Assembly.GetExecutingAssembly());
builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddDeliveryApi()
.AddComposers()
.Build();
WebApplication app = builder.Build();
await app.BootUmbracoAsync();
app.UseSession();
app.UseMiddleware<RedirectAfterLoginMiddleware>();
app.UseStateCheck();
app.UseUmbraco()
.WithMiddleware(u =>
{
u.UseBackOffice();
u.UseWebsite();
})
.WithEndpoints(u =>
{
u.UseInstallerEndpoints();
u.UseBackOfficeEndpoints();
u.UseWebsiteEndpoints();
});
await app.RunAsync();
using miniorange.aspnet.tfa;
using System.Reflection;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.Services.AddDistributedMemoryCache();
builder.Services.AddSession(options =>
{
options.IdleTimeout = TimeSpan.FromMinutes(60);
options.Cookie.HttpOnly = true;
options.Cookie.IsEssential = true;
});
builder.Services.AddminiOrangeServices(Assembly.GetExecutingAssembly());
builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddDeliveryApi()
.AddComposers()
.Build();
WebApplication app = builder.Build();
await app.BootUmbracoAsync();
app.UseSession();
app.UseMiddleware<RedirectAfterLoginMiddleware>();
app.UseStateCheck();
app.UseUmbraco()
.WithMiddleware(u =>
{
u.UseBackOffice();
u.UseWebsite();
})
.WithEndpoints(u =>
{
u.UseInstallerEndpoints();
u.UseBackOfficeEndpoints();
u.UseWebsiteEndpoints();
});
await app.RunAsync();
using miniorange.aspnet.tfa;
using System.Reflection;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.Services.AddDistributedMemoryCache();
builder.Services.AddSession(options =>
{
options.IdleTimeout = TimeSpan.FromMinutes(60);
options.Cookie.HttpOnly = true;
options.Cookie.IsEssential = true;
});
builder.Services.AddminiOrangeServices(Assembly.GetExecutingAssembly());
builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddDeliveryApi()
.AddComposers()
.Build();
WebApplication app = builder.Build();
await app.BootUmbracoAsync();
app.UseSession();
app.UseMiddleware<RedirectAfterLoginMiddleware>();
app.UseStateCheck();
app.UseUmbraco()
.WithMiddleware(u =>
{
u.UseBackOffice();
u.UseWebsite();
})
.WithEndpoints(u =>
{
u.UseInstallerEndpoints();
u.UseBackOfficeEndpoints();
u.UseWebsiteEndpoints();
});
await app.RunAsync();
using miniorange.aspnet.tfa;
using System.Reflection;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.Services.AddDistributedMemoryCache();
builder.Services.AddSession(options =>
{
options.IdleTimeout = TimeSpan.FromMinutes(60);
options.Cookie.HttpOnly = true;
options.Cookie.IsEssential = true;
});
builder.Services.AddminiOrangeServices(Assembly.GetExecutingAssembly());
builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddDeliveryApi()
.AddComposers()
.Build();
WebApplication app = builder.Build();
await app.BootUmbracoAsync();
app.UseSession();
app.UseMiddleware<RedirectAfterLoginMiddleware>();
app.UseStateCheck();
app.UseUmbraco()
.WithMiddleware(u =>
{
u.UseBackOffice();
u.UseWebsite();
})
.WithEndpoints(u =>
{
u.UseInstallerEndpoints();
u.UseBackOfficeEndpoints();
u.UseWebsiteEndpoints();
});
await app.RunAsync();
using miniorange.aspnet.tfa;
using System.Reflection;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.Services.AddDistributedMemoryCache();
builder.Services.AddSession(options =>
{
options.IdleTimeout = TimeSpan.FromMinutes(60);
options.Cookie.HttpOnly = true;
options.Cookie.IsEssential = true;
});
builder.Services.AddminiOrangeServices(Assembly.GetExecutingAssembly());
builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddDeliveryApi()
.AddComposers()
.Build();
WebApplication app = builder.Build();
await app.BootUmbracoAsync();
app.UseSession();
app.UseMiddleware<RedirectAfterLoginMiddleware>();
app.UseStateCheck();
app.UseUmbraco()
.WithMiddleware(u =>
{
u.UseBackOffice();
u.UseWebsite();
})
.WithEndpoints(u =>
{
u.UseInstallerEndpoints();
u.UseBackOfficeEndpoints();
u.UseWebsiteEndpoints();
});
await app.RunAsync();
using miniorange.aspnet.tfa;
using System.Reflection;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.Services.AddDistributedMemoryCache();
builder.Services.AddSession(options =>
{
options.IdleTimeout = TimeSpan.FromMinutes(60);
options.Cookie.HttpOnly = true;
options.Cookie.IsEssential = true;
});
builder.Services.AddminiOrangeServices(Assembly.GetExecutingAssembly());
builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddDeliveryApi()
.AddComposers()
.Build();
WebApplication app = builder.Build();
await app.BootUmbracoAsync();
app.UseSession();
app.UseMiddleware<RedirectAfterLoginMiddleware>();
app.UseStateCheck();
app.UseUmbraco()
.WithMiddleware(u =>
{
u.UseBackOffice();
u.UseWebsite();
})
.WithEndpoints(u =>
{
u.UseInstallerEndpoints();
u.UseBackOfficeEndpoints();
u.UseWebsiteEndpoints();
});
await app.RunAsync();
using System.Reflection;
using miniorange.aspnet.tfa;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.Services.AddDistributedMemoryCache();
builder.Services.AddSession(options =>
{
options.IdleTimeout = TimeSpan.FromMinutes(60);
options.Cookie.HttpOnly = true;
options.Cookie.IsEssential = true;
});
builder.Services.AddminiOrangeServices(Assembly.GetExecutingAssembly());
builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddComposers()
.Build();
WebApplication app = builder.Build();
await app.BootUmbracoAsync();
app.UseSession();
app.UseMiddleware<RedirectAfterLoginMiddleware>();
app.UseStateCheck();
app.UseHttpsRedirection();
app.MapWhen(
context => context.Request.Path.StartsWithSegments("/TFA") ||
context.Request.Path.StartsWithSegments("/Validate"),
tfa =>
{
tfa.UseRouting();
tfa.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
});
app.UseUmbraco()
.WithMiddleware(u =>
{
u.UseBackOffice();
u.UseWebsite();
})
.WithEndpoints(u =>
{
u.EndpointRouteBuilder.MapControllers();
u.UseBackOfficeEndpoints();
u.UseWebsiteEndpoints();
});
await app.RunAsync();
using miniorange.aspnet.tfa;
using System.Reflection;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.Services.AddDistributedMemoryCache();
builder.Services.AddSession(options =>
{
options.IdleTimeout = TimeSpan.FromMinutes(60);
options.Cookie.HttpOnly = true;
options.Cookie.IsEssential = true;
});
builder.Services.AddminiOrangeServices(Assembly.GetExecutingAssembly());
builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddDeliveryApi()
.AddComposers()
.Build();
WebApplication app = builder.Build();
await app.BootUmbracoAsync();
app.UseSession();
app.UseMiddleware<RedirectAfterLoginMiddleware>();
app.UseStateCheck();
app.UseUmbraco()
.WithMiddleware(u =>
{
u.UseBackOffice();
u.UseWebsite();
})
.WithEndpoints(u =>
{
u.UseInstallerEndpoints();
u.UseBackOfficeEndpoints();
u.UseWebsiteEndpoints();
});
await app.RunAsync();
using System.Reflection;
using miniorange.aspnet.tfa;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.Services.AddDistributedMemoryCache();
builder.Services.AddSession(options =>
{
options.IdleTimeout = TimeSpan.FromMinutes(60);
options.Cookie.HttpOnly = true;
options.Cookie.IsEssential = true;
});
builder.Services.AddminiOrangeServices(Assembly.GetExecutingAssembly());
builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddComposers()
.Build();
WebApplication app = builder.Build();
await app.BootUmbracoAsync();
app.UseSession();
app.UseMiddleware<RedirectAfterLoginMiddleware>();
app.UseStateCheck();
app.UseHttpsRedirection();
app.MapWhen(
context => context.Request.Path.StartsWithSegments("/TFA") ||
context.Request.Path.StartsWithSegments("/Validate"),
tfa =>
{
tfa.UseRouting();
tfa.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
});
app.UseUmbraco()
.WithMiddleware(u =>
{
u.UseBackOffice();
u.UseWebsite();
})
.WithEndpoints(u =>
{
u.EndpointRouteBuilder.MapControllers();
u.UseBackOfficeEndpoints();
u.UseWebsiteEndpoints();
});
await app.RunAsync();
- 구성이 완료되면 애플리케이션을 실행합니다.
구성 단계
Google Authenticator를 사용하여 Umbraco에 2단계 인증(2FA)을 구현하는 단계별 가이드입니다.
1. Umbraco 2FA 플러그인 대시보드에 접속합니다.
- 통합 후 브라우저를 열고 아래 URL을 사용하여 커넥터 대시보드를 탐색하세요.
https://<umbraco-base-url>/tfa/configure
- 회원가입 페이지 또는 로그인 페이지가 나타나면 miniOrange Umbraco 2FA 미들웨어를 애플리케이션에 성공적으로 추가한 것입니다.
- 계정을 등록하려면 클릭하세요. 회원가입 Umbraco 2FA 플러그인을 구성하는 버튼입니다.
- 등록이 성공적으로 완료되면 등록된 이메일 주소로 평가판 라이선스 키가 전송됩니다.
- 플러그인을 활성화하려면 다음 방법 중 하나를 사용할 수 있습니다.
- 입력 라이센스 키 제공된 입력 필드에 이메일을 통해 수신되었습니다.
OR
- 다운로드한 라이선스 파일을 업로드하세요. 라이선스 키 다운로드 버튼을 사용하여 파일 선택 옵션을 선택합니다.
- 그런 다음 확인란을 선택하세요. "위 조건을 읽었으며 플러그인을 활성화하고 싶습니다."를 클릭하고 라이센스 활성화 버튼을 클릭합니다.
- 라이선스 활성화가 성공적으로 완료되면 아래 그림과 같이 플러그인 대시보드가 열립니다.
2. Google OTP 구성
- 플러그인 대시보드에서 다음을 클릭하세요. 구성 버튼 아래에 인증 앱 Google Authenticator를 설정하기 위한 카드입니다.
- 클릭 후 구성 밸리 인증 앱 대시보드가 열리고 Google Authenticator, Microsoft Authenticator 및 Duo Authenticator 인증 방법이 표시됩니다.
- 클릭 구성 링크 옆 구글 인증 자 방법.
- 기기를 등록하려면 Google Authenticator 앱으로 QR 코드를 스캔하거나 비밀 코드를 사용하세요.
- QR 코드를 스캔하면 Google Authenticator 앱에서 6자리 토큰이 생성됩니다. 해당 토큰을 입력하고 [확인]을 클릭하세요. 확인 버튼을 눌러 확인하세요.
- Google Authenticator 인증 방식을 구성한 후에는 토글 버튼을 클릭하여 최종 사용자가 해당 방식을 사용할 수 있도록 활성화하세요.
- 활성화 최종 사용자를 위한 2FA 토글 버튼.
- 관리자에 대한 2단계 인증을 활성화하려면 다음을 켜십시오. 관리자 전용 비녀장.
3. Umbraco 로그인 페이지에서 Google OTP 테스트
- Umbraco 애플리케이션에 로그인하세요.
- 로그인 후 최종 사용자는 다음을 보게 됩니다. 2FA 설정 화면. 딸깍 하는 소리 설정 빗나가서 구글 인증 자.
- Google Authenticator 앱을 사용하여 QR 코드를 스캔하거나 비밀 키를 수동으로 입력하세요. 그런 다음 생성된 암호를 입력하세요.
- 암호를 입력한 후 클릭하세요. 확인 버튼을 눌러 Google Authenticator 등록을 완료하세요.
참고: 이러한 설정 단계는 사용자의 2단계 인증(TFA) 방식을 구성하기 위한 일회성 설정 입니다. 다음에 사용자가 로그인할 때는 인증을 완료하기 위해 유효성 검사 화면(아래 마지막 단계)만 표시됩니다.
- 이후 로그인 시에는 Google Authenticator 앱에서 생성된 암호를 입력하고 클릭하세요. 확인 버튼을 클릭합니다.
- 사용자는 움브라코 애플리케이션에 로그인됩니다.
관련 기사
당신의 응답을 주셔서 감사합니다. 곧 다시 연락드리겠습니다.
문제가 발생했습니다. 문의사항을 다시 제출해 주세요.
