Update OpenId/SAML2 (WsFederation) after startup











up vote
0
down vote

favorite












We have an asp.net core website that configures a bunch of database setups for SSO that are OpenId and Saml2 endpoints. These change or are added in a UI for Administrators as necessary.



Right now we have to recycle the app pool to update these because they're created and updated in the Startup.cs from the database.



I'm trying to find a way to be able to do CRUD on these at runtime but I can't find any documentation on how to get the AuthenticationBuilder and even if I could get it with injection, I can't find anything that would allow me to remove or edit existing ones, only add.



Anyone know how to get at this information ad update these dynamically at runtime?










share|improve this question


















  • 1




    Do I understand you correctly that you're trying to add/remove SAML and OpenID endpoints dynamically at runtime, in what I would assume is a kind of multi-tenant application?
    – Wim Ombelets
    Nov 20 at 12:29










  • That's right. Also need to be able to edit them in case a setting doesn't work, but of course we could remove and then add again if that's the only way.
    – James Hancock
    Nov 20 at 12:32










  • I won't add this as an answer because I don't want to take credit for someone else's work but have a look at Generic and Dynamic Controllers in asp.net core mvc - strathweb.com/2018/04/… as I believe it could solve your problem or at least point you in a possible direction.
    – Wim Ombelets
    Nov 20 at 12:34












  • Sorry, not sure how this helps. We use generic controllers extensively, but the oidc and saml2 support is a configuration option. I need to get at the configuration data and be able to add and remove them from my controllers instead of at startup. I can't find any methods that allow me to do so, or any way to get at the collection either.
    – James Hancock
    Nov 20 at 12:44










  • So you're trying to limit what kind of protocols to allow for a particular tenant at runtime?
    – Wim Ombelets
    Nov 20 at 12:50















up vote
0
down vote

favorite












We have an asp.net core website that configures a bunch of database setups for SSO that are OpenId and Saml2 endpoints. These change or are added in a UI for Administrators as necessary.



Right now we have to recycle the app pool to update these because they're created and updated in the Startup.cs from the database.



I'm trying to find a way to be able to do CRUD on these at runtime but I can't find any documentation on how to get the AuthenticationBuilder and even if I could get it with injection, I can't find anything that would allow me to remove or edit existing ones, only add.



Anyone know how to get at this information ad update these dynamically at runtime?










share|improve this question


















  • 1




    Do I understand you correctly that you're trying to add/remove SAML and OpenID endpoints dynamically at runtime, in what I would assume is a kind of multi-tenant application?
    – Wim Ombelets
    Nov 20 at 12:29










  • That's right. Also need to be able to edit them in case a setting doesn't work, but of course we could remove and then add again if that's the only way.
    – James Hancock
    Nov 20 at 12:32










  • I won't add this as an answer because I don't want to take credit for someone else's work but have a look at Generic and Dynamic Controllers in asp.net core mvc - strathweb.com/2018/04/… as I believe it could solve your problem or at least point you in a possible direction.
    – Wim Ombelets
    Nov 20 at 12:34












  • Sorry, not sure how this helps. We use generic controllers extensively, but the oidc and saml2 support is a configuration option. I need to get at the configuration data and be able to add and remove them from my controllers instead of at startup. I can't find any methods that allow me to do so, or any way to get at the collection either.
    – James Hancock
    Nov 20 at 12:44










  • So you're trying to limit what kind of protocols to allow for a particular tenant at runtime?
    – Wim Ombelets
    Nov 20 at 12:50













up vote
0
down vote

favorite









up vote
0
down vote

favorite











We have an asp.net core website that configures a bunch of database setups for SSO that are OpenId and Saml2 endpoints. These change or are added in a UI for Administrators as necessary.



Right now we have to recycle the app pool to update these because they're created and updated in the Startup.cs from the database.



I'm trying to find a way to be able to do CRUD on these at runtime but I can't find any documentation on how to get the AuthenticationBuilder and even if I could get it with injection, I can't find anything that would allow me to remove or edit existing ones, only add.



Anyone know how to get at this information ad update these dynamically at runtime?










share|improve this question













We have an asp.net core website that configures a bunch of database setups for SSO that are OpenId and Saml2 endpoints. These change or are added in a UI for Administrators as necessary.



Right now we have to recycle the app pool to update these because they're created and updated in the Startup.cs from the database.



I'm trying to find a way to be able to do CRUD on these at runtime but I can't find any documentation on how to get the AuthenticationBuilder and even if I could get it with injection, I can't find anything that would allow me to remove or edit existing ones, only add.



Anyone know how to get at this information ad update these dynamically at runtime?







asp.net-core saml-2.0 openid-connect openid-provider






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 19 at 20:16









James Hancock

1,26712335




1,26712335








  • 1




    Do I understand you correctly that you're trying to add/remove SAML and OpenID endpoints dynamically at runtime, in what I would assume is a kind of multi-tenant application?
    – Wim Ombelets
    Nov 20 at 12:29










  • That's right. Also need to be able to edit them in case a setting doesn't work, but of course we could remove and then add again if that's the only way.
    – James Hancock
    Nov 20 at 12:32










  • I won't add this as an answer because I don't want to take credit for someone else's work but have a look at Generic and Dynamic Controllers in asp.net core mvc - strathweb.com/2018/04/… as I believe it could solve your problem or at least point you in a possible direction.
    – Wim Ombelets
    Nov 20 at 12:34












  • Sorry, not sure how this helps. We use generic controllers extensively, but the oidc and saml2 support is a configuration option. I need to get at the configuration data and be able to add and remove them from my controllers instead of at startup. I can't find any methods that allow me to do so, or any way to get at the collection either.
    – James Hancock
    Nov 20 at 12:44










  • So you're trying to limit what kind of protocols to allow for a particular tenant at runtime?
    – Wim Ombelets
    Nov 20 at 12:50














  • 1




    Do I understand you correctly that you're trying to add/remove SAML and OpenID endpoints dynamically at runtime, in what I would assume is a kind of multi-tenant application?
    – Wim Ombelets
    Nov 20 at 12:29










  • That's right. Also need to be able to edit them in case a setting doesn't work, but of course we could remove and then add again if that's the only way.
    – James Hancock
    Nov 20 at 12:32










  • I won't add this as an answer because I don't want to take credit for someone else's work but have a look at Generic and Dynamic Controllers in asp.net core mvc - strathweb.com/2018/04/… as I believe it could solve your problem or at least point you in a possible direction.
    – Wim Ombelets
    Nov 20 at 12:34












  • Sorry, not sure how this helps. We use generic controllers extensively, but the oidc and saml2 support is a configuration option. I need to get at the configuration data and be able to add and remove them from my controllers instead of at startup. I can't find any methods that allow me to do so, or any way to get at the collection either.
    – James Hancock
    Nov 20 at 12:44










  • So you're trying to limit what kind of protocols to allow for a particular tenant at runtime?
    – Wim Ombelets
    Nov 20 at 12:50








1




1




Do I understand you correctly that you're trying to add/remove SAML and OpenID endpoints dynamically at runtime, in what I would assume is a kind of multi-tenant application?
– Wim Ombelets
Nov 20 at 12:29




Do I understand you correctly that you're trying to add/remove SAML and OpenID endpoints dynamically at runtime, in what I would assume is a kind of multi-tenant application?
– Wim Ombelets
Nov 20 at 12:29












That's right. Also need to be able to edit them in case a setting doesn't work, but of course we could remove and then add again if that's the only way.
– James Hancock
Nov 20 at 12:32




That's right. Also need to be able to edit them in case a setting doesn't work, but of course we could remove and then add again if that's the only way.
– James Hancock
Nov 20 at 12:32












I won't add this as an answer because I don't want to take credit for someone else's work but have a look at Generic and Dynamic Controllers in asp.net core mvc - strathweb.com/2018/04/… as I believe it could solve your problem or at least point you in a possible direction.
– Wim Ombelets
Nov 20 at 12:34






I won't add this as an answer because I don't want to take credit for someone else's work but have a look at Generic and Dynamic Controllers in asp.net core mvc - strathweb.com/2018/04/… as I believe it could solve your problem or at least point you in a possible direction.
– Wim Ombelets
Nov 20 at 12:34














Sorry, not sure how this helps. We use generic controllers extensively, but the oidc and saml2 support is a configuration option. I need to get at the configuration data and be able to add and remove them from my controllers instead of at startup. I can't find any methods that allow me to do so, or any way to get at the collection either.
– James Hancock
Nov 20 at 12:44




Sorry, not sure how this helps. We use generic controllers extensively, but the oidc and saml2 support is a configuration option. I need to get at the configuration data and be able to add and remove them from my controllers instead of at startup. I can't find any methods that allow me to do so, or any way to get at the collection either.
– James Hancock
Nov 20 at 12:44












So you're trying to limit what kind of protocols to allow for a particular tenant at runtime?
– Wim Ombelets
Nov 20 at 12:50




So you're trying to limit what kind of protocols to allow for a particular tenant at runtime?
– Wim Ombelets
Nov 20 at 12:50

















active

oldest

votes











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',
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%2f53382004%2fupdate-openid-saml2-wsfederation-after-startup%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















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%2f53382004%2fupdate-openid-saml2-wsfederation-after-startup%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

404 Error Contact Form 7 ajax form submitting

How to know if a Active Directory user can login interactively

Refactoring coordinates for Minecraft Pi buildings written in Python