Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Import SBOM

    Scheduled Pinned Locked Moved Support
    2 Posts 2 Posters 9 Views
    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.
    • P Offline
      pbinnell_2355
      last edited by

      Hi,
      I'm trying to use the examples for importing an SBOM file but I'm having an issue with security. The command comes from the example at https://docs.inedo.com/docs/proget-api-sca-sbom-import. The following command is being run from powershell.

      curl -X POST -H "X-ApiKey: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" -H "Content-Type: application/json; charset=UTF-8" -d "@C:\wrkdir\SBOMTest.txt" https://XXXXXX.example.com/api/sca/import

      I keep getting the following results but no matter the APIKey I keep getting the error...

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
      <title>401 - Unauthorized: Access is denied due to invalid credentials.</title>
      <style type="text/css">
      <!--
      body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
      fieldset{padding:0 15px 10px 15px;}
      h1{font-size:2.4em;margin:0;color:#FFF;}
      h2{font-size:1.7em;margin:0;color:#CC0000;}
      h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
      #header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
      background-color:#555555;}
      #content{margin:0 0 0 2%;position:relative;}
      .content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
      -->
      </style>
      </head>
      <body>
      <div id="header"><h1>Server Error</h1></div>
      <div id="content">
      <div class="content-container"><fieldset>
      <h2>401 - Unauthorized: Access is denied due to invalid credentials.</h2>
      <h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3>
      </fieldset></div>
      </div>
      </body>
      </html>

      I've also used "Invoke-RestMethod" but get the same results. Any ideas?

      Thank you,
      Paul

      stevedennisS 1 Reply Last reply Reply Quote 0
      • stevedennisS Offline
        stevedennis inedo-engineer @pbinnell_2355
        last edited by

        Hi @pbinnell_2355 ,

        It looks like you have Windows Integrated Authentication enabled. Curl does not support this, but with powerShell you would need to add -UseDefaultCredentials

        Thanks,
        Steve

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • 1 / 1
        • First post
          Last post
        Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation