Giter VIP home page Giter VIP logo

dnn.keymaster's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dnn.keymaster's Issues

Add Support for MachineKey

Add a provider that supports machineKey, specially:

  • validationKey
  • decryptionKey

<machineKey validationKey="****" decryptionKey="***" decryption="***" validation="***" />

AppSettings Containing _ Lost when applying KeyMaster

Describe the bug
The DNN application being used to apply Dnn.KeyMaster to contained some additional app settings which had an _ in the name Ie. "Portal_1". When Dnn.KeyMaster was applied these app settings were not transferred to Azure Key Vault and no warning was given.

To Reproduce
Steps to reproduce the behavior:
See description above

Expected Behavior
Vaues should be transferred to Azure Key Vault (if this is allowed) otherwise a warning should be given.

Actual Behavior
Values are lost with no warning given.

Version:

  • DNN: [e.g. 9.3.0]
  • Dnn.KeyMaster: [eg. 1.0.0]

Additional context
Add any other context about the problem here.

Unable to Test or Save Secrets

Describe the bug
Unable to test or save secrets on first load

To Reproduce
Steps to reproduce the behavior:

  1. Create a new DNN 9.2.2 instance
  2. Install 1.0.0.48
  3. Enter valid secrets (used from another side)
  4. Unable to save

Expected behavior
Expected the secrets to validate

Version:

  • DNN: 9.2.2
  • Dnn.KeyMaster: 1.0.0.48

Unable to Save on First Load

Describe the bug
Unable to Save when installing Key Master for the First Time

To Reproduce
Steps to reproduce the behavior:

  1. Create clean install of DNN
  2. Log in as host user
  3. Go to extensions and install the key master
  4. Go to Azure and configure your key vault correctly
  5. Enter the credentials and test the configuration
  6. Attempt to Save the credentials

Expected behavior
Credentials saved correctly to secrets.json.resources

Actual Behavior
The save hangs and doesn't properly save to file

Version:

  • DNN: 9.2.2
  • Dnn.KeyMaster: 1.0.0.51

objectQualifier not set in SqlDataProvider

Describe the bug
If using a DNN database with an object qualifier Eg. DNN_{TableName}, the object qualifier is lost when KeyMaster is applied.

To Reproduce
Steps to reproduce the behavior:

  1. Setup a DNN database with an object qualifer to prefix all the database objects.
  2. Install and run Dnn.KeyMaster.

Expected Behavior
App should reload with values in Azure Key Vault

Actual Behavior
App tries to redirect to /InstallWizard as it cannot connect to the database.
To fix issue objectQualifier="DNN" needs to be set in the web.config in the SqlDataProvider.

Version:

  • DNN: [e.g. 9.3.0]
  • Dnn.KeyMaster: [eg. 1.0.0]

Add Exception Handling for Bad Configuration

If the key vault denies the app from downloading the secrets there should be a useful exception message

  • Useful Exception Message
  • Log a useful message to log4net
  • Add trouble shooting documentation

Add Web API Security

The alpha build allows anyone to update the configuration and it needs to be locked down to host only

Encrypt Secrets.json File

Is your feature request related to a problem? Please describe.
The secrets.json.resources file is stored in plain text and should be encrypted. This will add another layer of security to the Key Master

Incompatible with 2sxc

Describe the bug
The key master is currently incompatible with 2sxc structured content

To Reproduce
Steps to reproduce the behavior:

  1. Install the Key Master on a new DNN site
  2. Configure the Key Master
  3. Start the Key Master
  4. Install 2sxc v9.32 LTS
  5. Add a 2sxc Content or App to any page

Expected behavior
The 2sxc Content or App should be created and start the standard behavior of 2sxc

Screenshots
image

Version:

  • DNN: 9.2.2
  • Dnn.KeyMaster: 1.0.0

Additional context
Stack Trace:
Error: App is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: A suitable constructor for type 'ToSic.Eav.Apps.Interfaces.IEnvironmentFactory' could not be located. Ensure the type is concrete and services are registered for all parameters of a public constructor. ---> System.InvalidOperationException: A suitable constructor for type 'ToSic.Eav.Apps.Interfaces.IEnvironmentFactory' could not be located. Ensure the type is concrete and services are registered for all parameters of a public constructor. at Microsoft.Extensions.Internal.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters) at Microsoft.Extensions.Internal.ActivatorUtilities.CreateInstance[T](IServiceProvider provider, Object[] parameters) at ToSic.Eav.Factory.Resolvet in C:\Projects\eav-server\ToSic.Eav.Core\Factory.cs:line 79 at ToSic.SexyContent.ContentBlocks.ModuleContentBlock..ctor(IInstanceInfo instanceInfo, Log parentLog, ITenant tenant, IEnumerable`1 overrideParams) in C:\Projects\2sxc-dnn742\Website\DesktopModules\ToSIC_SexyContent\ToSic.Sxc\SexyContent\ContentBlocks\ModuleContentBlock.cs:line 43 at ToSic.SexyContent.View.get_SxcInstance() in C:\Projects\2sxc-dnn742\Website\DesktopModules\ToSIC_SexyContent\View.ascx.cs:line 24 at ToSic.SexyContent.View.Page_PreRender(Object sender, EventArgs e) in C:\Projects\2sxc-dnn742\Website\DesktopModules\ToSIC_SexyContent\View.ascx.cs:line 54 --- End of inner exception stack trace ---

Add Configuration Wizard

There should be some kind of configuration wizard so the user doesn't have to create the key vault and app registration manually

This can be a 2.0 feature

RFC: When Using Azure Env Vars, Allow Edit?

Given the website is hosted by Azure you can specify app secrets in the App Settings feature. This will remove any hard coded secrets on disk.

For background if you are not using Azure Env Vars the secrets are stored in a file that contain the following important Vars

  • Client ID
  • Client Secret
  • Secret Name
  • Tenant I'd
  • Key Vault URL

Question

If the website is configured as stated above should we allow the host user ability to override from the DNN Website?

My Argument

If the user chooses to manage their secrets from the Azure Env Vars I think they should be locked out from managing their secrets. It should only be managed from the Azure interface. This will increase the website security significantly as there will be no way to get the secrets without azure portal access.

Add Confirmation Dialog When Key Master is Toggled On/Off

When the Key Master is toggled on/off the entire page needs to be reloaded. Currently this automatically happens but the User Experience is kind of clunky since the page load takes a long time. We should add an alert/modal that notifies the user that the process is complete and the website will be reloaded.

Remove Lib Folder

The current release is built targeting Dnn 9.2 but there are no 9.2 NuGets. When this gets resolved we can remove the lib folder

Add Automated Deployment Testing for 9.x.x

This is generated out of the question about testing different versions of 9.x.x and upgrade scenarios.
#27

Goal

Create a build pipeline that accomplishes the following:

  • Tests installation of the module on each version of 9.x.x

Cleanup API Calls to be Concise

  • Split API calls into Secrets and Home
  • Update DnnApiControllers to inherit from PersonaBar API Controllers
  • Refactor response object to match best practices in the persona bar

RFC: What Type of Package Should the Key Master Install As?

Currently the Key Master installs as a Persona Bar Extension but it is more than just that

  • Data Provider
  • SQL Membership Provider
  • Connects with azure key vault using a specified configuration
  • Persona Bar UI
    • Controls Azure Config
    • Controls App Settings Config
    • Future - will control other settings as added

Currently the extension installs as 1 Persona Bar extension. Would this be better marked under another category such as:

  • Providers
  • Connectors

Test Dnn Upgrade Scenario from 9.2.x -> 9.3

  • Investigate Dnn upgrade path from 9.2.x -> 9.3 with the extension installed
  • Investigate the Dnn Data Provider for all versions of 9.x
  • Investigate how hard it will be to add data provider logic to decide the correct data provider given the current installed version of dnn
  • Investigate how hard it will be to automate testing of upgrade paths using this extension
  • Investigate how hard it will be to automate testing installation of changes to every version of dnn at 9.x.x so it can be certified on the readme

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.