Skip to content

adding JWT enablement to C samples #306

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

shreeya1510
Copy link
Contributor

No description provided.

@ibmmqmet
Copy link
Collaborator

ibmmqmet commented Jun 14, 2025

While the basic function looks to be OK, there's a bunch of things that ought to be sorted out:

  • CRLF chars - when I pulled down the changes all the lines had ^M characters at the end. DOS format. Ought to check the real format for consistency. Maybe your git config core.autocrlf needs checking. Makes the files look messy on Linux.
  • Your README and Makefile assumes MacOS. Homebrew is a MacOS-only thing. You need to check everything on Linux too.
    • Maybe have multiple default definitions in the Makefile based on the OS
  • Using ifeq does not work on the standard AIX make. On that platform, you have to use the GNU version of make
  • What's the situation on Windows? The README at minimum ought to say that the JWT example code can't be built there
  • Using userid/password to authenticate to the keycloak server is deprecated. It should be using ClientID and ClientSecret. Which has a slightly different endpoint syntax.
  • Copyright dates on modified files should still have the original date as well as the most recently changed date. So "(c) 2024,2025"
  • The code would not build on Linux because the Makefile pulled in MQ's shipped copy of the curl library.
    • Moving the JWT_LDFLAGS before the MQLIB seemed to sort that out
  • Some of the C parts need layout cleanup. For example there's at least one unindented block inside an if. And for consistency, you need spaces in } else {.
  • Note that the keystore cannot be the standard MQ kdb format - has to be something that OpenSSL (used from curl) can work with. So maybe needs instructions on creating that.
    • You might be able to use the MQ-provided curl to access kdb files with suitable changes to the build or environment, but that's probably not a good idea

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

Successfully merging this pull request may close these issues.

2 participants