API Connect

 View Only
  • 1.  JWT creation and validation using HS256 algo

    Posted Tue May 14, 2024 11:23 AM

    Can anyone please generate and validate JWT token using HS256 algorithm using shared secret key in API Connect? Also need help to generate shared secret key.



    ------------------------------
    Nirmalya Mukherjee
    ------------------------------


  • 2.  RE: JWT creation and validation using HS256 algo

    Posted Thu May 16, 2024 01:26 PM

    Hi Nirmulya,
    Please see the jws sign/verify policies in the public github repository of sample user defined policies at https://github.com/ibm-apiconnect/policy-apigw/tree/master/user-defined-policies.  The GatewayScript code in that policy will hopefully be useful for you.
    Best Regards,
    Steve Linn



    ------------------------------
    Steve Linn
    Senior Consulting I/T Specialist
    IBM
    ------------------------------



  • 3.  RE: JWT creation and validation using HS256 algo

    Posted Thu May 16, 2024 11:58 PM

    Hey Steve,

    Looks like the page doesn't exist, throwing 404 error.



    ------------------------------
    Nirmalya Mukherjee
    ------------------------------



  • 4.  RE: JWT creation and validation using HS256 algo

    Posted Fri May 17, 2024 08:29 AM

    Hi Nirmalya,
    I my effort to be grammatically correct, the period that ends the sentence was added to the url which is why you're getting the 404.  Either remove that period in your browser or use:
    https://github.com/ibm-apiconnect/policy-apigw/tree/master/user-defined-policies

    Best Regards,
    Steve Linn



    ------------------------------
    Steve Linn
    Senior Consulting I/T Specialist
    IBM
    ------------------------------



  • 5.  RE: JWT creation and validation using HS256 algo

    Posted 7 days ago

    Hi Steve,

    Provided UDPs are not supported for the V5 Compatible API gateway. Can you share any alternative to implement the JWT?

    Thanks and Regards,

    Vishal Ghadage



    ------------------------------
    Vishal Ghadage
    ------------------------------



  • 6.  RE: JWT creation and validation using HS256 algo

    Posted 3 days ago

    Hi Vishal,
    You are correct, I had provided the link to the v10 API Gateway user defined sample policies.  The equivalent v5(c) user defined sample policies can be found at https://github.com/ibm-apiconnect/policy 
    Best Regards,
    Steve Linn



    ------------------------------
    Steve Linn
    Senior Consulting I/T Specialist
    IBM
    ------------------------------