FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login
    1. Home
    2. Pyroseza
    P
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 4
    • Best 0
    • Controversial 0
    • Groups 0

    Pyroseza

    @Pyroseza

    0
    Reputation
    1
    Profile views
    4
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Pyroseza Unfollow Follow

    Latest posts made by Pyroseza

    • RE: Kickstart in CI environment unpredictable

      @bert-goethals Can you please explain how you have used the webhook in your Github CI action?

      I've got the same problem happening and I'm not even sure what to point the new webhook to?

      I've posted this question if you could please assist me in any way at all, it would highly appreciated: https://fusionauth.io/community/forum/topic/1525/how-should-i-be-using-the-kickstart-success-webhook

      posted in General Discussion
      P
      Pyroseza
    • How should I be using the kickstart.success webhook?

      This question was originally posted on Github here: https://github.com/FusionAuth/fusionauth-issues/issues/1178#issuecomment-1043217851

      The exact problem is described here by someone else and is how I found out about the kickstart webhook to address this as of v1.30: https://fusionauth.io/community/forum/topic/751/kickstart-in-ci-environment-unpredictable/2

      Documentation links if you're not aware of it:

      • https://fusionauth.io/docs/v1/tech/installation-guide/kickstart#determining-kickstart-completion
      • https://fusionauth.io/docs/v1/tech/events-webhooks/events/kickstart-success

      The question is:
      How exactly does one create this webhook at the time of creating the fusionauth instance and what exactly do I point it to in a CI/CD pipeline?

      My exact scenario:
      I have a repo on github with a single docker-compose file that starts up fusionauth with a postgresql db as well as my own django app and its own database. I have a github action configured to build my local docker image and pull the other images from docker hub, then deploy and do some basic testing so I know my application works when I commit and push changes.

      Every now and then I seem to run into a race condition that fusionauth does not complete startup yet the rest of my containers start up and carry on like normal, then when the testing code runs it just all falls over, simply re-running the CI/CD action on github again and annoyingly yields different results, it just needs an extra second or two.

      I personally would have preferred if there was an API endpoint I could query is to whether or not the kickstart has completed successfully, but instead we were given a webhook and I'm not quite sure how I should be using it.

      From what I can gather I have to create and enable the webhook, but I want to do this automatically in the existing CI/CD pipeline I have in github, so does that mean that I must create the webhook using the kickstart itself and how do I get it to fire the webhook back on itself?

      My application has not yet started so I can send the webhook to my django application.

      Also in my case there is no long running instance to point the webhook to, as mentioned earlier in the same CI/CD pipeline for fusionauth I have the rest of my application code that builds and start up AFTER fusionauth, and it's all in one place using docker-compose.

      Can someone please explain what is the correct and expected use of this webhook as it's not very clear to me how it should work or how I should be using this. Would I have to redesign my app to accept this? I just want to make sure I do the right thing and I'm not overlooking something blindingly obvious to others.

      I assume something like this would go in the kickstart.json, but I'm not sure and would like some advice on how to use this correctly.

      {
          "requests": [
          {
              "method": "POST",
              "url": "/api/webhook",
              "body": {
                  "webhook": {
                      "connectTimeout": 1000,
                      "description": "Kickstart Sucess Webhook",
                      "eventsEnabled": {
                          "kickstart.success": true
                      },
                      "httpAuthenticationPassword": "password",
                      "httpAuthenticationUsername": "username",
                      "url": "what goes here?"
                  }
              }
          }
          ]
      }
      
      posted in Q&A kickstart webhook startup ci cd docker-compose
      P
      Pyroseza
    • RE: How can I get all users for an application using the API?

      @dan yes correct, what is the appropriate syntax for the database search?

      How would I do this kind of search for users within a Postgresql database, I'm not using ElasticSearch.

      posted in Q&A
      P
      Pyroseza
    • RE: How can I get all users for an application using the API?

      @dan said in How can I get all users for an application using the API?:

      Note you won't be able to search for users based on their application registration when using the database engine. See the API docs for more details.

      Regarding your note above, I'd like to know what is the correct way to perform the exact same search above but using a python client against a database, unfortunately the documentation does not explain how the API works from the view of the official python client

      posted in Q&A
      P
      Pyroseza