Nuages Identity is an ASP.NET Core 7 application implementing ASP.NET Identity. The main goal is to provide a production-ready solution, not just a startup sample project.
Support is provided for the following Database engine.
By default, the application will run with the following settings
Those settings can be changed using standard configuration mechanism.
From root directory,
cd src/Nuages.Identity.UI
dotnet run
Application will be available at https://localhost:8001
From the root directory,
docker build -t nuages.identity.ui .
docker run -it --rm -p 8003:80 --env-file ./env.list --name nuage-identity nuages.identity.ui
Application will be available at http://localhost:8003 (no HTTPS)
Note: env.list must include environment variables required to run the app (see Configuration below)
The application can be deployed using standard ASP.NET Core mechanism.
The sample site https://identity.nuages.org is deployed on AWS with ECS using the following CDK project.
https://github.com/nuages-io/nuages-deploy-ecs-cdk
Configuration is done using the standard Configuration system. You may want to use one of the following ways to customize the application.
{
"Nuages": {
"Data": {
"Storage": "InMemory",
"ConnectionString": "",
"Redis": ""
}
}
}
IMPORTANT! Initial database migration is required for SqlServer and MySql.
{
"ConnectionString" : "server=localhost;user=yourUser;password=yourPassword;database=identity"
}
dotnet ef database update
{
"Nuages": {
"Identity": {
"Name": "Nuages",
"Authority": "https://localhost:8001",
"SupportsAutoPasswordExpiration": true,
"AutoExpirePasswordDelayInDays": 60,
"SupportsLoginWithEmail": true,
"AutoConfirmExternalLogin": true,
"EnablePasswordHistory": "true",
"PasswordHistoryCount": 5,
"Audiences": [
"IdentityAPI"
],
"Password": {
"RequiredLength": 6,
"RequireNonAlphanumeric": true,
"RequireLowercase": true,
"RequireUppercase": true,
"RequireDigit": true,
"RequiredUniqueChars": 1
}
}
}
}
{
"Nuages": {
"UI": {
"AllowSelfRegistration": true,
"ExternalLoginAutoEnrollIfEmailExists": true,
"ExternalLoginPersistent": true,
"EnableMagicLink": true,
"EnablePhoneFallback": true,
"Enable2FARememberDevice": true,
"EnableFido2": true,
"FontAwesomeUrl": "https://kit.fontawesome.com/70b74b4315.js"
}
}
}
{
"Nuages": {
"Localization": {
"DefaultCulture": "fr-CA",
"LangClaim": "lang",
"Cultures": [
"fr-CA",
"en-CA"
]
}
}
}
See https://github.com/nuages-io/nuages-localization for more localization information
{
"Nuages": {
"OpenIdDict": {
"EncryptionKey": "",
"SigningKey": "",
"CreateDemoClients": true
}
}
}
{
"Nuages": {
"Web": {
"GoogleRecaptcha": {
"SiteKey": "",
"SecretKey": ""
}
}
}
}
{
"Nuages": {
"OpenIdProviders": {
"Google": {
"ClientId": "",
"ClientSecret": ""
},
"Microsoft": {
"ClientId": "",
"ClientSecret": ""
},
"Facebook": {
"AppId": "",
"AppSecret": ""
},
"GitHub": {
"ClientId": "",
"ClientSecret": ""
}
}
}
}
{
"Nuages":
{
"EventBus" :
{
"Source" : null,
"Name" : null
}
}
}
{
"Nuages":
{
"MessageService": {
"SendFromEmail": "youremail@yourdomain.com",
"DefaultCulture": "en"
}
}
}
{
"Nuages": {
"ApplicationConfig": {
"ParameterStore": {
"Enabled": false,
"Path": "/NuagesIdentity"
},
"AppConfig": {
"Enabled": false,
"ApplicationId": "NuagesIdentity",
"EnvironmentId": "Prod",
"ConfigProfileId": "WebUI"
}
}
}
}
Application settings can be set using System Manager ParameterStore and AppConfig.
Set Enable to true to activate.
More info here https://github.com/aws/aws-dotnet-extensions-configuration
You can use a secret instead of a string value for any configuration value.
Ex. Let's says you want to hide the database connection string
So instead of
{
"Nuages": {
"Data": {
"ConnectionString": "my connection string value"
}
}
}
You can swap the value for a secret ARN (the ARN can be found in your AWS account)
{
"Nuages": {
"Data": {
"ConnectionString": "arn:aws:secretsmanager:{region}:{account_id}:secret:identity/mongo-ABC123"
}
}
}
Only string values are supported.
Some restrictions apply compare to the default ASP.NET identity implementation.