Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need Support to Configure xk6 Diameter with DTLS using SCTP #17

Open
srikr opened this issue May 13, 2024 · 5 comments
Open

Need Support to Configure xk6 Diameter with DTLS using SCTP #17

srikr opened this issue May 13, 2024 · 5 comments

Comments

@srikr
Copy link

srikr commented May 13, 2024

I was following this link to test diameter protocol: GitHub - MATRIXXSoftware/xk6-diameter: A k6 extension for Diameter protocol 1
I was able to make it work for non TLS with TCP. I want to configure xk6 Diameter with DTLS using SCTP. Do we have any sample config or any help link which mentions all this in detail.

@lwlee2608
Copy link
Contributor

You can enable TLS/SCTP using this example configuration:

let client = diam.Client({
    requestTimeout: "50ms",
    enableWatchdog: false,
    authApplicationId: [app.ChargingControl],
    vendorSpecificApplicationId: [
        {
            authApplicationId: app.ChargingControl,
            vendorId: vendor.TGPP,
        }
    ],
    capabilityExchange: {
        vendorId: 35838,
    },
    transportProtocol: "sctp",
    tls: {
        enable: true,
    },
})

@srikr
Copy link
Author

srikr commented May 14, 2024

Thanks @lwlee2608 for the response will try this and update.

@srikr
Copy link
Author

srikr commented May 14, 2024

@lwlee2608 I am using freediameter server version 1.2.1. I am seeing following error in the server:

21:16:46 NOTI freeDiameterd daemon initialized.
21:16:54 ERROR ERROR: in '(fd_tls_rcvthr_core(cnx, ctx->strid ? ctx->session : cnx->cc_tls_para.session))' : Transport endpoint is not connected
21:16:54 ERROR TLS ERROR: in 'gnutls_handshake( ctx->session )' : Error in the pull function.
21:16:54 ERROR TLS ERROR: in 'gnutls_handshake( ctx->session )' : Error in the pull function.
21:16:54 ERROR TLS ERROR: in 'gnutls_handshake( ctx->session )' : Error in the pull function.
21:16:54 ERROR TLS ERROR: in 'gnutls_handshake( ctx->session )' : Error in the pull function.
21:16:54 ERROR TLS ERROR: in 'gnutls_handshake( ctx->session )' : Error in the pull function.
21:16:54 ERROR TLS ERROR: in 'gnutls_handshake( ctx->session )' : Error in the pull function.
21:16:54 ERROR TLS ERROR: in 'gnutls_handshake( ctx->session )' : Error in the pull function.
21:16:54 ERROR TLS ERROR: in 'gnutls_handshake( ctx->session )' : Error in the pull function.
21:16:54 ERROR TLS ERROR: in 'gnutls_handshake( ctx->session )' : Error in the pull function.
21:16:54 ERROR TLS ERROR: in 'gnutls_handshake( ctx->session )' : Error in the pull function.
21:16:54 ERROR TLS ERROR: in 'gnutls_handshake( ctx->session )' : Error in the pull function.
21:16:54 ERROR TLS ERROR: in 'gnutls_handshake( ctx->session )' : Error in the pull function.
21:16:54 ERROR TLS ERROR: in 'gnutls_handshake( ctx->session )' : Error in the pull function.
21:16:54 ERROR TLS ERROR: in 'gnutls_handshake( ctx->session )' : Error in the pull function.
21:16:54 ERROR TLS ERROR: in 'gnutls_handshake( ctx->session )' : Error in the pull function.
21:16:54 NOTI Handshake failed on 15/16 stream pairs
21:16:54 ERROR ERROR: in '((fd_sctp3436_handshake_others(conn, priority, alt_creds)))' : Transport endpoint is not connected

Below is configuration I made based on the above suggestion:

let client = diam.Client({
requestTimeout: "50ms",
enableWatchdog: false,
authApplicationId: [app.ChargingControl],
vendorSpecificApplicationId: [
{
authApplicationId: app.ChargingControl,
vendorId: vendor.TGPP,
}
],
capabilityExchange: {
vendorId: 35838,
},
transportProtocol: "sctp",
tls: {
enable: true,
cert: "/etc/ssl/CA/server3_cert.pem",
key: "/etc/ssl/CA/server3_key.pem",
},
})

Not sure its a problem with the server or the data that client is sending from xk6-diameter.

@lwlee2608
Copy link
Contributor

I have not used FreeDiameter, so I am unable to help you with that.

However, I tested xk6-diameter with this diameter server.
https://github.com/lwlee2608/diameter-example

SCTP without TLS:
image

SCTP with TLS:
image

@srikr
Copy link
Author

srikr commented May 15, 2024

Sure Thanks @lwlee2608. The main reason I am sticking with freediameter is that it supports applications like SIP, 3GPP, NAS, EAP etc to test. The server that you have shared above can it be used to test all these Diameter applications or Is this a custom server only for testing basic diameter flows. If we don't have support for this applications now in both client and server do we have any plans to add these later both from client and server perspective.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants