Salesforce integration in closed community?

Sure. You should be able to have Discourse use the same SSO master and that should do pretty much what you’re looking for.