Menu

#85 S3 BACKEND_URL credentials error

duply
closed-fixed
nobody
s3 (3)
5
2015-11-24
2015-08-07
No

Duply 1.10 version inserts url encoded username into target url with S3 protocol but, AFAIK, S3 doesn't support it.
Now, trying to make a backup raises the following python exception:

InvalidUriError: Invalid match bucket name in URI "XXXXXXXXXXx@bucket-name"

Duply 1.9.2 works fine because it sends credentials as BACKEND_PARAMS.

Related

Bugs: #85

Discussion

  • ede

    ede - 2015-08-07

    that's an unfortunate but necessary backward incompatibility. pls check the Changelog and unset user and passphrase vars and export the needed env vars instead.

    ..ede

    On August 7, 2015 12:25:36 PM GMT+02:00, David Pujadas dpujadas@users.sf.net wrote:


    ** [bugs:#85] S3 BACKEND_URL credentials error**

    Status: open
    Group: duply
    Labels: s3
    Created: Fri Aug 07, 2015 10:25 AM UTC by David Pujadas
    Last Updated: Fri Aug 07, 2015 10:25 AM UTC
    Owner: nobody

    Duply 1.10 version inserts url encoded username into target url with S3
    protocol but, AFAIK, S3 doesn't support it.
    Now, trying to make a backup raises the following python exception:

    InvalidUriError: Invalid match bucket name in URI
    "XXXXXXXXXXx@bucket-name"

    Duply 1.9.2 works fine because it sends credentials as BACKEND_PARAMS.


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/ftplicity/bugs/85/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Bugs: #85

  • David Pujadas

    David Pujadas - 2015-08-10

    Export AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in profile conf file solved the problem.

    Thanks

     
  • tengel

    tengel - 2015-08-26

    You have broken backwards compatibility in an amazingly horrible way, and it's not properly documented on HOW to fix it unless you go spelunking through crap and just "figure it out". For the next person along who's backups on several machines broke with 1.10+ updates, here's what you do:

    1) Copy TARGET_USER and TARGET_PASS from your .duply/<profile>/conf to a notepad, then comment them out. If you don't comment them out, the new duply 1.10+ will shove them into your bucket name for some reason that isn't clear at all resulting in errors and a python exception.</profile>

    2) If you don't already, create a wrapper script to run your duply commands so that you can export the variables.

    3) In the wrapper, export the Environment variables for your service before you run duply that are the same values as TARGET_USER and TARGET_PASS, for example:

    S3:
    export AWS_ACCESS_KEY_ID=(old TARGET_USER)
    export AWS_SECRET_ACCESS_KEY=(old TARGET_PASS)

    Google:
    export GS_ACCESS_KEY_ID=(old TARGET_USER)
    export GS_SECRET_ACCESS_KEY=(old TARGET_PASS)

    The upgrade to 1.10 should have just done this better rather than straight up breaking existing configs with no clear explanation of what to do (that Changelog is a joke, as is the template). I also don't see why the code couldn't have just examined the TARGET for the bucket keywords (i.e. gs:// or s3://) and exported the TARGET_USER and TARGET_PASS into the needed variables and not screw up the bucket name.

    Horrible upgrade. Horrible. If you break backwards compatibility this hard, up the version number a full major release (2.x) and add warnings ahead of time about how you're about to break everyone's configuration.

     
    • ede

      ede - 2015-08-26

      On 26.08.2015 02:37, troy engel wrote:

      You have broken backwards compatibility in an amazingly horrible way, and it's not properly documented on HOW to fix it unless you go spelunking through crap and just "figure it out".

      you probably refer to the Changelog which you immediately read after your old config stopped working with the new version i suppose?

      For the next person along who's backups on several machines broke with 1.10+ updates, here's what you do:

      1) Copy TARGET_USER and TARGET_PASS from your .duply/<profile>/conf to a notepad, then comment them out. If you don't comment them out, the new duply 1.10+ will shove them into your bucket name for some reason that isn't clear at all resulting in errors and a python exception.</profile>

      if you are not aware, 1.10.1 released 7 days ago fixed this issue

      2) If you don't already, create a wrapper script to run your duply commands so that you can export the variables.

      totally unnecessary, put them into your conf file as documented in the Changelog

      3) In the wrapper, export the Environment variables for your service before you run duply that are the same values as TARGET_USER and TARGET_PASS, for example:

      S3:
      export AWS_ACCESS_KEY_ID=(old TARGET_USER)
      export AWS_SECRET_ACCESS_KEY=(old TARGET_PASS)

      Google:
      export GS_ACCESS_KEY_ID=(old TARGET_USER)
      export GS_SECRET_ACCESS_KEY=(old TARGET_PASS)

      The upgrade to 1.10 should have just done this better rather than straight up breaking existing configs with no clear explanation of what to do (that Changelog is a joke, as is the template).

      well sir, right back at you. and please mind your manners if you plan to post any more tickets. rudeness only get's you so far.

      I also don't see why the code couldn't have just examined the TARGET for the bucket keywords (i.e. gs:// or s3://) and exported the TARGET_USER and TARGET_PASS into the needed variables and not screw up the bucket name.

      1. inserting the user into the url was a bug resulting of the cleanup. that's fixed.

      2. wrt. to parsing protocols and treating every one differently i stated my reasons in the Changelog entry

      Horrible upgrade. Horrible.

      hope you will recover from your experience soon. btw. nobody forced you to upgrade.. simply stick to the old if it works for you.

      If you break backwards compatibility this hard, up the version number a full major release (2.x) and add warnings ahead of time about how you're about to break everyone's configuration.

      noted. my opinion on it is still that the Changelog entry explains the change it well enough provided of course that users read it if they experience problems after an upgrade.
      expecting that your config will work after an upgrade is nice, but not guaranteed by many softwares, not just duply.

      anyway.. thx for your entertaining post. you made my morning.. ede

       
      • rmoriz

        rmoriz - 2016-06-10

        For the next person along who's backups on several machines broke with 1.10+ updates, here's what you do:
        1) Copy TARGET_USER and TARGET_PASS from your .duply/<profile>/conf to a notepad, then comment them out. If you don't comment them out, the new duply 1.10+ will shove them into your bucket name for some reason that isn't clear at all resulting in errors and a python exception.
        if you are not aware, 1.10.1 released 7 days ago fixed this issue</profile>

        It's still the case with 1.11.3. and duplicity 0.7.07.1

        If you specify the legacy TARGET_USER and TARGET_PASS and exporting AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY:

        "InvalidUriError: Invalid bucket name in URI "s3"

         
        • ede

          ede - 2016-06-10

          as explained in the 1.10 changelog. there is and will be no more target specific code in duply.

          why are you setting TARGET_USER and TARGET_PASS at all when they are not supported by this backend.

          i am sorry that this breaks backward compatibility of the conf file, but i see no other way i could have reached mentioned aim.

          regards ..ede

          On 10.06.2016 14:56, Roland Moriz wrote:

          For the next person along who's backups on several machines broke with 1.10+ updates, here's what you do:
          1) Copy TARGET_USER and TARGET_PASS from your .duply/<profile>/conf to a notepad, then comment them out. If you don't comment them out, the new duply 1.10+ will shove them into your bucket name for some reason that isn't clear at all resulting in errors and a python exception.
          if you are not aware, 1.10.1 released 7 days ago fixed this issue</profile>

          It's still the case with 1.11.3. and duplicity 0.7.07.1

          If you specify the legacy TARGET_USER and TARGET_PASS and exporting AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY:

          "InvalidUriError: Invalid bucket name in URI "s3"


          ** [bugs:#85] S3 BACKEND_URL credentials error**

          Status: closed-fixed
          Group: duply
          Labels: s3
          Created: Fri Aug 07, 2015 10:25 AM UTC by David Pujadas
          Last Updated: Tue Nov 24, 2015 01:33 PM UTC
          Owner: nobody

          Duply 1.10 version inserts url encoded username into target url with S3 protocol but, AFAIK, S3 doesn't support it.
          Now, trying to make a backup raises the following python exception:

          InvalidUriError: Invalid match bucket name in URI "XXXXXXXXXXx@bucket-name"

          Duply 1.9.2 works fine because it sends credentials as BACKEND_PARAMS.


          Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/ftplicity/bugs/85/

          To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

           

          Related

          Bugs: #85

          • rmoriz

            rmoriz - 2016-06-10

            why are you setting TARGET_USER and TARGET_PASS at all when they are not supported by this backend.

            because some recent Distros still ship an older duply version that relies on that, while others not. I hoped to find a way to write a config file that works with all versions of duply/duplicity.

             
            • ede

              ede - 2016-06-10

              i am open to suggestions, but hacking special rules for every backend and documenting them and the whole routine again when some backend changes is just a waste of time.

              ..ede

              On 10.06.2016 15:42, rmoriz wrote:

              why are you setting TARGET_USER and TARGET_PASS at all when they are not supported by this backend.

              because some recent Distros still ship an older duply version that relies on that, while others not. I hoped to find a way to write a config file that works with all versions of duply/duplicity.


              ** [bugs:#85] S3 BACKEND_URL credentials error**

              Status: closed-fixed
              Group: duply
              Labels: s3
              Created: Fri Aug 07, 2015 10:25 AM UTC by David Pujadas
              Last Updated: Tue Nov 24, 2015 01:33 PM UTC
              Owner: nobody

              Duply 1.10 version inserts url encoded username into target url with S3 protocol but, AFAIK, S3 doesn't support it.
              Now, trying to make a backup raises the following python exception:

              InvalidUriError: Invalid match bucket name in URI "XXXXXXXXXXx@bucket-name"

              Duply 1.9.2 works fine because it sends credentials as BACKEND_PARAMS.


              Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/ftplicity/bugs/85/

              To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

               

              Related

              Bugs: #85

  • sinklar

    sinklar - 2015-09-11

    Hi ede,

    I got it working but you have to admit that it's not really explained in the changelog. :-) Or is it?

     

    Last edit: sinklar 2015-09-11
    • ede

      ede - 2015-09-11

      morning Sinklar,

      "
      1.10 (31.7.2015)
      ...
      - featreq 31 " Support for duplicity Azure backend " - ignored a
      contributed patch by Scott McKenzie and instead opted for removing almost
      all code that deals with special env vars required by backends.
      adding and modifying these results in too much overhead so i dropped this
      feature. the future alternative for users is to consult the duplicity
      manpage and add the needed export definitions to the conf file.
      appended a commented example to the template conf below the auth section.
      "
      http://duply.net/wiki/index.php/Duply-Changelog

      if you feel this can be solved, worded better feel free to suggest anything apart from versioning config files ;).. ede/duply.net

      On 11.09.2015 07:40, sinklar wrote:

      Hi ede,

      Sorry but where in the changelog is the explanation about how to solve this?
      Thanks!


      ** [bugs:#85] S3 BACKEND_URL credentials error**

      Status: open
      Group: duply
      Labels: s3
      Created: Fri Aug 07, 2015 10:25 AM UTC by David Pujadas
      Last Updated: Wed Aug 26, 2015 12:37 AM UTC
      Owner: nobody

      Duply 1.10 version inserts url encoded username into target url with S3 protocol but, AFAIK, S3 doesn't support it.
      Now, trying to make a backup raises the following python exception:

      InvalidUriError: Invalid match bucket name in URI "XXXXXXXXXXx@bucket-name"

      Duply 1.9.2 works fine because it sends credentials as BACKEND_PARAMS.


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/ftplicity/bugs/85/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #85

      • sinklar

        sinklar - 2015-09-12

        Maybe just telling clearly in the changelog that people need to use something like :

        export GS_ACCESS_KEY_ID=
        export GS_SECRET_ACCESS_KEY=
        

        instead of:

        TARGET_USER=
        TARGET_PASS=
        

        would be good enough. ;-)

         
        • ede

          ede - 2015-09-12

          you are aware that there are several backends demanding special env vars. if i document s3 i would have to do the same for every backend. that's exactly the reason why i point to the duplicity man page.

          when i find time i might readd the old routines and add a deprecation warning for those cases. but that's kind of a big if.

          ..ede

          On 12.09.2015 15:58, sinklar wrote:

          Maybe just telling clearly in the changelog that people need to use something like :

          export GS_ACCESS_KEY_ID=
          export GS_SECRET_ACCESS_KEY=
          

          instead of:

          TARGET_USER=
          TARGET_PASS=
          

          would be good enough. ;-)


          ** [bugs:#85] S3 BACKEND_URL credentials error**

          Status: open
          Group: duply
          Labels: s3
          Created: Fri Aug 07, 2015 10:25 AM UTC by David Pujadas
          Last Updated: Fri Sep 11, 2015 05:40 AM UTC
          Owner: nobody

          Duply 1.10 version inserts url encoded username into target url with S3 protocol but, AFAIK, S3 doesn't support it.
          Now, trying to make a backup raises the following python exception:

          InvalidUriError: Invalid match bucket name in URI "XXXXXXXXXXx@bucket-name"

          Duply 1.9.2 works fine because it sends credentials as BACKEND_PARAMS.


          Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/ftplicity/bugs/85/

          To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

           

          Related

          Bugs: #85

  • ede

    ede - 2015-11-24
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB