FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Using Kickstart - only the first API Key is created

    Scheduled Pinned Locked Moved Unsolved
    Q&A
    kickstart api keys
    0
    3
    4.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      hd_steve
      last edited by

      Hello! I'm using a kickstart file to provision my testing environment and it's looking good so far, except for the creation of API keys. Only the first key is being generated, and no subsequent ones. I'm following the format presented here: https://fusionauth.io/docs/v1/tech/installation-guide/kickstart/

      The relevant part of the kickstart.json file looks like this:

        "apiKeys": [
          {
            "key":"#{masterKey}",
            "description": "Master Key"
          },
          {
            "key": "long-string-here",
            "description": "User Update Key",
            "permissions": {
              "endpoints": {
                "/api/group/member": ["POST", "DELETE"],
                "/api/user": ["GET", "POST", "PUT", "PATCH"],
                "/api/user/comment": ["GET", "POST"]
              }
            }
          },
          {
            "key": "long-string-here",
            "description": "User Import Key",
            "permissions": {
              "endpoints": {
                "/api/user/import": ["GET", "POST", "PUT", "PATCH"],
                "/api/user/search": ["GET", "POST"]
              }
            }
          }
        ]
      

      But upon completion of the startup process, only the "Master Key" has been created. Is there a syntax error that I'm not spotting? From the guide, linked above, I thought that this would create the three keys.

      1 Reply Last reply Reply Quote 0
      • M
        mgetka Power User
        last edited by

        Anything special appears in the logs on startup?

        long-string-here is a placeholder for the purpose of the forum post, or is it actually the key you're trying to create? If it is the latter, then it will cause conflict - keys values needs to be unique. If the masterKey variable is also set to long-string-here, then you will end up with only one key created and errors in the logs.

        1 Reply Last reply Reply Quote 1
        • danD
          dan
          last edited by

          @hd_steve did you get this resolved?

          --
          FusionAuth - Auth for devs, built by devs.
          https://fusionauth.io

          1 Reply Last reply Reply Quote 0
          • First post
            Last post