Skip to main content

Notifications

Announcements

No record found.

Supply chain | Supply Chain Management, Commerce
Suggested answer

How does MPOS certification work

Posted on by 1,433

During training it was discovered that CloudPOS has some limitations and we need to use MPos as well. 

Now I have to figure out how certification work.

A certificate comes with the RetailSDK: ...\RetailSDK\BuildTools\ModernPOSAppxSigningCert-Contoso.pfx 

For now our IT department has taken this certificate and installed it on the local machine where they installed MPOS for testing/training.

I checked the deployable package that was created earlier by MSBuild and this certificate is part of it. Is this just a development certificate or can this be used for the sandbox and production environments too?

I also see the name of this certificate in the customization.settings file:

<ModernPOSPackageCertificateKeyFile Condition="'$(ModernPOSPackageCertificateKeyFile)' == ''">$(MSBuildThisFileDirectory)\ModernPOSAppxSigningCert-Contoso.pfx</ModernPOSPackageCertificateKeyFile>

I did some research on certificates and saw this issue regarding thumbprints: community.dynamics.com/.../971143

That prompted me to look at the package.appxmanifest under  Pos.App in the ModernPOS solution. It looks like it already has a certificate in there. I assume it is the one that is in RetailSDK buildTools mentioned above. Which I also assume is the one that is in the customization.settings file already.

Also, if this is not the certificate to use for the sandbox (user testing) and production environments, how do I go about getting a certificate? This is a physical file. I assume I then put it under RetailSDK\BuildTools and then select it in package.appxmanifest properties under the packaging tab,  Correct? As well as emailing the file to the IT department to install it on each local machine.

Currently the following global settings are still with their default values except for the version number I had to change:

***

 <AssemblyNamePrefix Condition="'$(AssemblyNamePrefix)' == ''">Contoso</AssemblyNamePrefix>
    <CustomAssemblyVersion Condition="'$(CustomAssemblyVersion)' == ''">10.0.7.0</CustomAssemblyVersion>
    <CustomVersion Condition="'$(CustomVersion)' == ''">10.0.7.1</CustomVersion>
    <CustomName Condition="'$(CustomName)' == ''">Contoso Retail Customization</CustomName>
    <CustomDescription Condition="'$(CustomDescription)' == ''">Contoso Retail Customization</CustomDescription>
    <CustomPublisher Condition="'$(CustomPublisher)' == ''">CN=Contoso Ltd.</CustomPublisher>
    <CustomPublisherDisplayName Condition="'$(CustomPublisherDisplayName)' == ''">Contoso Ltd.</CustomPublisherDisplayName>
    <CustomCopyright Condition="'$(CustomCopyright)' == ''">Copyright © 2016</CustomCopyright>

***

If I change the publisher name then I assume the certificate under RetailSDK\BuildTools will not be valid anymore, correct?

Also why did the MSBuild not put the certificate in the deployable package because it is under retailSDK\BuildTools by default. Or is it by design that it should not be part of the deployable package but need to be put in place manually on the local machines for security reasons?

If I can keep using this certificate in development, sandbox and production, will the certificate change with each upgrade of the RetailSDK?

  • Suggested answer
    Retha Profile Picture
    Retha 1,433 on at
    RE: How does MPOS certification work

    Package.Appxmanifest didn't like any of the certifications our IT guy generated. VS keeps on telling us it was expired. We in the end opted for VS to generate the certificate and we used this one. It had a thumbprint that I had to use in my customization.settings file.

    I followed the example in community.dynamics.com/.../971143, to add a configuration setting with the thumbprint in the customization.settings file and I have not had any issues with the thumbprint on my Dev box.

    The only extra thing we had to do was applying the following for MPOS to work:

    docs.microsoft.com/.../retail-POS-activation-changes

  • Retha Profile Picture
    Retha 1,433 on at
    RE: How does MPOS certification work

    Our IT manager created a certificate for me. I have the actual pfx-file.

    When I try to add it to ModernPOS  in the package.appxmanifest file I get the following error .

    My steps are:

    1) put the file in RetailSDK\BuildTools

    2) Log into VS and open solution ModernPOS

    3) double-click on package.appxmanifest and click on the packaging tab

    4) Click on choose Certificate

    5) Then click on Configure certificate -> Select from file

    6) I then select the certificate file that I have placed in buildTools.

    7) It prompt me for a password and I enter the password that the IT manager gave me and click on OK

    8) It then gave me this error:

    7356.pastedimage1580422481539v1.png

    If I go to that link, it opens up as: docs.microsoft.com/.../br230260(v=vs.110)

    The above link states that I have to look at the EnableSigningChecks property.Where do I find this property?  In RetailSDK\BuildTools\Microsoft.Dynamics.RetailSDK.Build.targes I can only see the following:

    ***

    <Target
        Name="CodeSigning"
        BeforeTargets="AfterBuildPushBinaryToReferences"
        Condition="'$(AuthenticodeSignEnabled)' == 'true' AND '$(BuildingInVsts)' != 'true' AND '$(SelfServicePackageCertificateThumbprint)' != ''">
          <Message
          Text="Running CodeSigning:
            Thumbprint: $(SelfServicePackageCertificateThumbprint)
            Framework:  $(TargetFrameworkVersion)
            Target:     $(TargetPath)" />
          <SignFile
            CertificateThumbprint="$(SelfServicePackageCertificateThumbprint)"
            SigningTarget="$(TargetPath)"
            TargetFrameworkVersion="$(TargetFrameworkVersion)" />
      </Target>

    ***

    I don't think they are talking about the above.

    Do I have to first enter the information in the Customization.Settings file or first add it to the package.appxmanifest file?

    I would prefer to go with a file instead of a thumbprint because there is a comment in Customization.Settings file that states a project cannot be build in VS when a thumbprint is used. I don't know if they mean the regular right-click on a solution and choose build. 

    It may not matter because I do my programming n cloudPOS and not ModernPOS. But we will have MPOS and CloudPOS, but for my development I do not need MPOS othe rthan to get the certificate in to go with the deployable package.

    Also the comment in customization.Settings state that the name of the certificate must be the same as the publisher name. However if I look at the development certificate that came with the RetailSDK, the name of the actual file is not the same as the publisher name in customization.settings.

    I removed the spaces that was in the name of the pfx-file I received. 

    Any help is appreciated to get tis certificate in place, will be much appreciated.

    I am on RetailSDK version: 10.0.319.20001 if it makes a difference.

  • Oksana Kovaliova Profile Picture
    Oksana Kovaliova 3,597 on at
    RE: How does MPOS certification work

    I would say, yes, it should be deployed.

  • Retha Profile Picture
    Retha 1,433 on at
    RE: How does MPOS certification work

    Does MPOS need a certificate deployed as a pre-requisite for deploying MPos in production?

  • Oksana Kovaliova Profile Picture
    Oksana Kovaliova 3,597 on at
    RE: How does MPOS certification work

    Hi, certificate from SDK must not be used in Sandbox/Production, you can use it for dev. purposes only (this is the same for MPOS and for Hardware station packages)

    From where to get certificate: 1) buy from certification authority; 2) create certificate from customer internal authority.

    We are using way 2 often, this is the guide: docs.microsoft.com/.../signing-windows-8-applications-using-an-internal-pki

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans