Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save ERP Credenials in Vault Options #138

Open
3 of 5 tasks
PatrickGrub opened this issue Jun 9, 2020 · 3 comments
Open
3 of 5 tasks

Save ERP Credenials in Vault Options #138

PatrickGrub opened this issue Jun 9, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@PatrickGrub
Copy link
Collaborator

PatrickGrub commented Jun 9, 2020

Details

The dummy plugin uses no credentials at the moment to communicate afterward with the ERP.

UseCase

  • User can save/change the credentials via a dialog where the password is hidden by clicking in the vault toolsbar "powerGate->Credentials". Material in project EMPL for the dialog
  • The ERP credentials should be saved in the Vault Options
  • The client must transfer in Connect-ERP the credentials
  • The dummy plugin must read the User and Password from the request see Ticket 3797

Example for plugin read credentials

Extend powerGateServer config:

<behaviors>
      <serviceBehaviors>
        <behavior>
          <log4net />
          <serviceCredentials>
            <userNameAuthentication userNamePasswordValidationMode="Custom"
               customUserNamePasswordValidatorType="WCF_UserAuthentication.UserAuthentication, WCF_UserAuthentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/> 
          </serviceCredentials> 
        </behavior>
      </serviceBehaviors>
</behaviors>

Im Plugin ist es zu erweitern, das wird für jeden Service verwendet:

using System;
using System.IdentityModel.Selectors;
using System.IdentityModel.Tokens;
 
namespace WCF_UserAuthentication
{
  public class UserAuthentication : UserNamePasswordValidator
  {
    public override void Validate(string userName, string password)
    {
      if (userName == null || null == password)
        throw new ArgumentNullException();
      if (!(userName == "coolOrange") || !(password == "coo!Orange"))
        throw new SecurityTokenException("Unknown Username or Password");
    }
  }
}
@PatrickGrub PatrickGrub added the enhancement New feature or request label Jun 9, 2020
@manfredmalleier
Copy link
Contributor

Functionality implemented in Metso #157:

@PatrickGrub
Copy link
Collaborator Author

@kevinhallerCO this issue should be planned on my site since its very powerful and flexible for endcustomers, it will take about 4 hours.

@kevinhallerCO
Copy link

@PatrickGrub planned for the 28th. January for now (if there should be more urgent matters, we'll re-schedual this issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants