FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login
    1. Home
    2. Tags
    3. java
    Log in to post
    • All categories
    • danD

      Solved Failure when starting FusionAuth in Docker on Mac M4

      Q&A
      • mac failure java • • dan
      2
      0
      Votes
      2
      Posts
      772
      Views

      danD

      This is due to a bug in the openjdk java library that the docker image uses. You can learn more about the bug here and track our fix (which looks like upgrading the java image our docker file users) by following this bug.

      Until then, the workaround is to pass this java argument at start time:

      -XX:UseSVE=0

      This argument disables the use of the SVE extension, which is provides "better data parallelism for HPC and ML".

      You can do that with the FUSIONAUTH_APP_ADDITIONAL_JAVA_ARGS environment variable in your Dockerfile. Here's an example:

      fusionauth: # ... environment: # ... FUSIONAUTH_APP_ADDITIONAL_JAVA_ARGS: -XX:UseSVE=0
    • S

      How to generate and authorized java spring controller using JWT

      General Discussion
      • fusionauth jwt java client creds • • shyamsundar.k
      5
      1
      Votes
      5
      Posts
      2.4k
      Views

      danD

      @shyamsundar-k said in How to generate and authorized java spring controller using JWT:

      We need to pass the token in the API header as Authorization: Bearer<token> But what is the process so that I can validate the endpoint with the valid token if the token is invalid or does not have the required roles or scope then I should get 401 else I should be able to access the API successfully.

      Once you have a token in your API, you can validate it in two different ways. But it's worth noting that to validate the token, you must validate the signature and then the claims.

      First option: use a library to validate the signature. Most languages have options. For java, you can use fusionauth-jwt, the readme has sample code.

      Second option: use the validate API. You could use the FusionAuth client library to make this call if you'd like.

      The first means you have to pick a library. The second means you have to make a network call.

      Either way, after you validate the signature, you need to check the claims (issuer, audience, expiration, custom claims) to make sure they are what you expect.

      Here's more about how to consume a JWT.

    • S

      Performance issues even with a 8 Core + 32 gigs.

      Q&A
      • java performance • • sswami
      21
      0
      Votes
      21
      Posts
      71.6k
      Views

      danD

      Thanks @sjswami , this duplicate ids issue is now resolved in 1.19.7. Appreciate you letting us know about it: https://github.com/FusionAuth/fusionauth-issues/issues/890

    • danD

      I'm seeing weirdness around timestamps and I use jackson

      Q&A
      • webhooks timestamps java data serialization • • dan
      2
      0
      Votes
      2
      Posts
      6.3k
      Views

      danD

      Apparently jackson + friends make assumptions when it comes to parsing raw -> ZonedDateTime. It appears that the ZonedDateTime for createInstant when deserializing timestamps are not being handled properly somehow, so you need custom code. We have our own Jackson serializer and deserializer for ZonedDateTime to ensure we always get milli in and milli out.

      Here's the code (Apache2 license) and the maven repository links if it's helpful.