Identity Server 4 - IDX10630: PII is hidden










1














I'm fairly new to using encryption and rsa tokens and I'm trying to get IDentityServer4 to not use the developersigning, but one of my own. Here is what I have tried so far:



var keyInfo = new RSACryptoServiceProvider().ExportParameters(true);
var rsaSecurityKey = new RsaSecurityKey(new RSAParameters

D = keyInfo.D,
DP = keyInfo.DP,
DQ = keyInfo.DQ,
Exponent = keyInfo.Exponent,
InverseQ = keyInfo.InverseQ,
Modulus = keyInfo.Modulus,
P = keyInfo.P,
Q = keyInfo.Q
);

services.AddIdentityServer()
.AddSigningCredential(rsaSecurityKey)
.AddInMemoryPersistedGrants()
.AddInMemoryIdentityResources(Config.GetIdentityResources())
.AddInMemoryApiResources(Config.GetApiResources())
.AddInMemoryClients(Config.GetClients())
.AddAspNetIdentity<User>();


However, when I run Identity Server4 and I get redirected to sign in page from another website, I get the following error:




IDX10630: The '[PII is hidden]' for signing cannot be smaller than '[PII is hidden]' bits. KeySize: '[PII is hidden]'.
Parameter name: key.KeySize




I have to admit, I've been on this all weekend, trying to figure out how to use SigningCredentials and I'm not really sure what I've done wrong above.










share|improve this question

















  • 1




    Well, an easy fix is to just call '[PII is hidden]' followed by '[PII is hidden]',
    – James K Polk
    Nov 12 '18 at 3:50










  • @JamesKPolk I don't know what you mean by that
    – Bojan
    Nov 12 '18 at 4:00






  • 2




    You can see what is hidden: github.com/IdentityServer/IdentityServer4/issues/…
    – Ruard van Elburg
    Nov 12 '18 at 8:22















1














I'm fairly new to using encryption and rsa tokens and I'm trying to get IDentityServer4 to not use the developersigning, but one of my own. Here is what I have tried so far:



var keyInfo = new RSACryptoServiceProvider().ExportParameters(true);
var rsaSecurityKey = new RsaSecurityKey(new RSAParameters

D = keyInfo.D,
DP = keyInfo.DP,
DQ = keyInfo.DQ,
Exponent = keyInfo.Exponent,
InverseQ = keyInfo.InverseQ,
Modulus = keyInfo.Modulus,
P = keyInfo.P,
Q = keyInfo.Q
);

services.AddIdentityServer()
.AddSigningCredential(rsaSecurityKey)
.AddInMemoryPersistedGrants()
.AddInMemoryIdentityResources(Config.GetIdentityResources())
.AddInMemoryApiResources(Config.GetApiResources())
.AddInMemoryClients(Config.GetClients())
.AddAspNetIdentity<User>();


However, when I run Identity Server4 and I get redirected to sign in page from another website, I get the following error:




IDX10630: The '[PII is hidden]' for signing cannot be smaller than '[PII is hidden]' bits. KeySize: '[PII is hidden]'.
Parameter name: key.KeySize




I have to admit, I've been on this all weekend, trying to figure out how to use SigningCredentials and I'm not really sure what I've done wrong above.










share|improve this question

















  • 1




    Well, an easy fix is to just call '[PII is hidden]' followed by '[PII is hidden]',
    – James K Polk
    Nov 12 '18 at 3:50










  • @JamesKPolk I don't know what you mean by that
    – Bojan
    Nov 12 '18 at 4:00






  • 2




    You can see what is hidden: github.com/IdentityServer/IdentityServer4/issues/…
    – Ruard van Elburg
    Nov 12 '18 at 8:22













1












1








1







I'm fairly new to using encryption and rsa tokens and I'm trying to get IDentityServer4 to not use the developersigning, but one of my own. Here is what I have tried so far:



var keyInfo = new RSACryptoServiceProvider().ExportParameters(true);
var rsaSecurityKey = new RsaSecurityKey(new RSAParameters

D = keyInfo.D,
DP = keyInfo.DP,
DQ = keyInfo.DQ,
Exponent = keyInfo.Exponent,
InverseQ = keyInfo.InverseQ,
Modulus = keyInfo.Modulus,
P = keyInfo.P,
Q = keyInfo.Q
);

services.AddIdentityServer()
.AddSigningCredential(rsaSecurityKey)
.AddInMemoryPersistedGrants()
.AddInMemoryIdentityResources(Config.GetIdentityResources())
.AddInMemoryApiResources(Config.GetApiResources())
.AddInMemoryClients(Config.GetClients())
.AddAspNetIdentity<User>();


However, when I run Identity Server4 and I get redirected to sign in page from another website, I get the following error:




IDX10630: The '[PII is hidden]' for signing cannot be smaller than '[PII is hidden]' bits. KeySize: '[PII is hidden]'.
Parameter name: key.KeySize




I have to admit, I've been on this all weekend, trying to figure out how to use SigningCredentials and I'm not really sure what I've done wrong above.










share|improve this question













I'm fairly new to using encryption and rsa tokens and I'm trying to get IDentityServer4 to not use the developersigning, but one of my own. Here is what I have tried so far:



var keyInfo = new RSACryptoServiceProvider().ExportParameters(true);
var rsaSecurityKey = new RsaSecurityKey(new RSAParameters

D = keyInfo.D,
DP = keyInfo.DP,
DQ = keyInfo.DQ,
Exponent = keyInfo.Exponent,
InverseQ = keyInfo.InverseQ,
Modulus = keyInfo.Modulus,
P = keyInfo.P,
Q = keyInfo.Q
);

services.AddIdentityServer()
.AddSigningCredential(rsaSecurityKey)
.AddInMemoryPersistedGrants()
.AddInMemoryIdentityResources(Config.GetIdentityResources())
.AddInMemoryApiResources(Config.GetApiResources())
.AddInMemoryClients(Config.GetClients())
.AddAspNetIdentity<User>();


However, when I run Identity Server4 and I get redirected to sign in page from another website, I get the following error:




IDX10630: The '[PII is hidden]' for signing cannot be smaller than '[PII is hidden]' bits. KeySize: '[PII is hidden]'.
Parameter name: key.KeySize




I have to admit, I've been on this all weekend, trying to figure out how to use SigningCredentials and I'm not really sure what I've done wrong above.







c# rsa identityserver4 signing






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 12 '18 at 2:22









Bojan

2,03092773




2,03092773







  • 1




    Well, an easy fix is to just call '[PII is hidden]' followed by '[PII is hidden]',
    – James K Polk
    Nov 12 '18 at 3:50










  • @JamesKPolk I don't know what you mean by that
    – Bojan
    Nov 12 '18 at 4:00






  • 2




    You can see what is hidden: github.com/IdentityServer/IdentityServer4/issues/…
    – Ruard van Elburg
    Nov 12 '18 at 8:22












  • 1




    Well, an easy fix is to just call '[PII is hidden]' followed by '[PII is hidden]',
    – James K Polk
    Nov 12 '18 at 3:50










  • @JamesKPolk I don't know what you mean by that
    – Bojan
    Nov 12 '18 at 4:00






  • 2




    You can see what is hidden: github.com/IdentityServer/IdentityServer4/issues/…
    – Ruard van Elburg
    Nov 12 '18 at 8:22







1




1




Well, an easy fix is to just call '[PII is hidden]' followed by '[PII is hidden]',
– James K Polk
Nov 12 '18 at 3:50




Well, an easy fix is to just call '[PII is hidden]' followed by '[PII is hidden]',
– James K Polk
Nov 12 '18 at 3:50












@JamesKPolk I don't know what you mean by that
– Bojan
Nov 12 '18 at 4:00




@JamesKPolk I don't know what you mean by that
– Bojan
Nov 12 '18 at 4:00




2




2




You can see what is hidden: github.com/IdentityServer/IdentityServer4/issues/…
– Ruard van Elburg
Nov 12 '18 at 8:22




You can see what is hidden: github.com/IdentityServer/IdentityServer4/issues/…
– Ruard van Elburg
Nov 12 '18 at 8:22












1 Answer
1






active

oldest

votes


















0














Check out my answer below for details on how to generate and wire up X509 certs for signing credentials. Hopefully it's helpful.



How we can replace AddDeveloperSigningCredential on AWS Serverless Lambda environment?






share|improve this answer




















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53255246%2fidentity-server-4-idx10630-pii-is-hidden%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Check out my answer below for details on how to generate and wire up X509 certs for signing credentials. Hopefully it's helpful.



    How we can replace AddDeveloperSigningCredential on AWS Serverless Lambda environment?






    share|improve this answer

























      0














      Check out my answer below for details on how to generate and wire up X509 certs for signing credentials. Hopefully it's helpful.



      How we can replace AddDeveloperSigningCredential on AWS Serverless Lambda environment?






      share|improve this answer























        0












        0








        0






        Check out my answer below for details on how to generate and wire up X509 certs for signing credentials. Hopefully it's helpful.



        How we can replace AddDeveloperSigningCredential on AWS Serverless Lambda environment?






        share|improve this answer












        Check out my answer below for details on how to generate and wire up X509 certs for signing credentials. Hopefully it's helpful.



        How we can replace AddDeveloperSigningCredential on AWS Serverless Lambda environment?







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 12 '18 at 11:57









        mackie

        1,90811110




        1,90811110



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53255246%2fidentity-server-4-idx10630-pii-is-hidden%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Use pre created SQLite database for Android project in kotlin

            Darth Vader #20

            Ondo