dotnet / dotnet/wcf

IPSTS and FPSTS saml tokens

Open
#5,605 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.8k
Forks
576
Avg merge
6d 9h
Merged PRs (30d)
2

Description

Hello,

we are developing WS client (.net 8) to communicate with public infrastructure in Czech Republic, but we have problem to configure WSFederation to issue token from IPSTS, with that token issue new saml token from FPSTS and use it on another web service.

```
String fpstsEndpoint = "https://localhost:8000/FPSTS/issue.svc";
X509Certificate2 x509 = new X509Certificate2("cert.pfx", "******");

var issuerBinding = new WS2007HttpBinding(SecurityMode.TransportWithMessageCredential);
issuerBinding.Security.Message.ClientCredentialType = MessageCredentialType.Certificate;
issuerBinding.Security.Message.EstablishSecurityContext = false;
var factory = new WSTrustChannelFactory(issuerBinding, new EndpointAddress("https://tnia.identitaobcana.cz/IPSTS/issue.svc/certificate"));
factory.Credentials.ClientCertificate.Certificate = x509;
IWSTrustChannelContract channel = factory.CreateTrustChannel();

var trustRequest = new WsTrustRequest(WsTrustActions.Trust13.Issue)
{
AppliesTo = new AppliesTo(new EndpointReference(fpstsEndpoint)),
KeySizeInBits = 256,
KeyType = WsTrustKeyTypes.Trust13.Symmetric,
WsTrustVersion = WsTrustVersion.Trust13
};
SecurityToken reply = channel.IssueAsync(trustRequest).Result;
```

We have issued the IPSTS token from Identity Provider with code above, but how can we set it on WSFedrationHttpBinding to authenticate to FPSTS?

IPSTS: http://tnia.identitaobcana.cz/IPSTS/issue.svc/certificate
Communication is based on:
- WS2007HttpBinding
- WS-Security with certificate
- WSTrust13
- SOAP 1.2

FPSTS: http://tnia.identitaobcana.cz/FPSTS/issue.svc
Communication is based on:
- WS2007FederationHttpBinding
- WS-Security with token - saml11 token from identity provider (IPSTS)
- WSTrust13
- SOAP 1.2

WS: http://tnia.identitaobcana.cz/ws/submission/public.svc/token
Communication is based on:
- WS2007FederationHttpBinding
- WS-Security with token - saml11 token from federation hub (FPSTS)
- WSTrust13
- SOAP 1.2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.