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!

    Synchronise resource credentials from Buildmaster to Otter

    Scheduled Pinned Locked Moved Support
    otterbuildmaster
    4 Posts 3 Posters 13 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.
    • C Offline
      clint.jenkinson_0617
      last edited by

      Hi Guys,

      We currently have Buildmaster synchronising to an Otter instance, however resource credentials are not included in this synch. Is there any way we could achieve this, as we have a significant number of credentials in BM that we would prefer to not have to manually reenter and maintain on an ongoing basis.

      Thanks,

      Clint

      Product: BuildMaster
      Version: 5.8.1

      1 Reply Last reply Reply Quote 0
      • apxltdA Offline
        apxltd inedo-engineer
        last edited by

        Hey Clint;

        This was intentional in the infrastructure sync; credentials are a bit trickier, because of the encryption key and fact that some credentials aren't supported.

        That said, this is definitely on our roadmap and will (likely) come in the form of a new (free) product that manages multiple instances of our tools:

        • users and permissions
        • licenses
        • resource credentials
        • infrastructure (?)
        • other settings?

        In the mean time, it's possible to do with a database script / simple tool that just updates rows from one database to another (ResourceCredentials table). We can certainly help with that if needed.

        Founder and CEO, Inedo

        1 Reply Last reply Reply Quote 0
        • C Offline
          clint.jenkinson_0617
          last edited by

          That would be very helpful thanks Alex.

          Clint

          1 Reply Last reply Reply Quote 0
          • benB Offline
            ben inedo-engineer
            last edited by

            Hello Clint,

            This SQL will copy any credentials that BuildMaster has but Otter doesn't to Otter. However, it will not work if BuildMaster and Otter use different encryption keys. You can find the encryption keys for BuildMaster and Otter in app_appSettings.config and in web_appSettings.config. The key will look like this in the file: <add key="Persistence.EncryptionKey" value="[encryption key is here]" />

            INSERT INTO [Otter].[dbo].[Credentials] ([Environment_Id], [Credential_Name], [CredentialType_Name], [LegacyConfiguration_Bytes], [Configuration_Xml], [AllowFunctionAccess_Indicator])
            -- Omit the line above this comment to test this before running it for real
            SELECT OE.[Environment_Id]
                  ,BC.[Credential_Name]
                  ,BC.[CredentialType_Name]
                  ,[LegacyConfiguration_Bytes] = NULL
                  ,[Configuration_Xml] = CAST(REPLACE(
                                            REPLACE(
                                                REPLACE(
                                                    REPLACE(
                                                        REPLACE(
                                                            REPLACE(
                                                                REPLACE(
                                                                    REPLACE(
                                                                        REPLACE(
                                                                            REPLACE(
                                                                                CAST(BC.[Configuration_Xml] AS VARCHAR(MAX)),
                                                                                '<Inedo.BuildMaster.Extensibility.Credentials.BuildMasterCredentials Assembly="BuildMasterCore">',
                                                                                '<Inedo.Otter.Extensions.Credentials.BuildMasterCredentials Assembly="OtterCore">'
                                                                            ),
                                                                            '<Inedo.BuildMaster.Extensibility.Credentials.OtterCredentials Assembly="BuildMasterCore">',
                                                                            '<Inedo.Otter.Extensions.Credentials.OtterCredentials Assembly="OtterCore">'
                                                                        ),
                                                                        '<Inedo.BuildMaster.Extensibility.Credentials.ProGetCredentials Assembly="BuildMasterCore">',
                                                                        '<Inedo.Otter.Extensions.Credentials.ProGetCredentials Assembly="OtterCore">'
                                                                    ),
                                                                    '<Inedo.BuildMaster.Extensibility.Credentials.PrivateKeyCredentials Assembly="BuildMasterCore">',
                                                                    '<Inedo.Otter.Extensions.Credentials.PrivateKeyCredentials Assembly="OtterCore">'
                                                                ),
                                                                '<Inedo.BuildMaster.Extensibility.Credentials.UsernamePasswordCredentials Assembly="BuildMasterCore">',
                                                                '<Inedo.Otter.Extensions.Credentials.UsernamePasswordCredentials Assembly="OtterCore">'
                                                            ),
                                                            '</Inedo.BuildMaster.Extensibility.Credentials.BuildMasterCredentials>',
                                                            '</Inedo.Otter.Extensions.Credentials.BuildMasterCredentials>'
                                                        ),
                                                        '</Inedo.BuildMaster.Extensibility.Credentials.OtterCredentials>',
                                                        '</Inedo.Otter.Extensions.Credentials.OtterCredentials>'
                                                    ),
                                                    '</Inedo.BuildMaster.Extensibility.Credentials.ProGetCredentials>',
                                                    '</Inedo.Otter.Extensions.Credentials.ProGetCredentials>'
                                                ),
                                                '</Inedo.BuildMaster.Extensibility.Credentials.PrivateKeyCredentials>',
                                                '</Inedo.Otter.Extensions.Credentials.PrivateKeyCredentials>'
                                            ),
                                            '</Inedo.BuildMaster.Extensibility.Credentials.UsernamePasswordCredentials>',
                                            '</Inedo.Otter.Extensions.Credentials.UsernamePasswordCredentials>'
                                        ) AS XML)
                  ,BC.[AllowFunctionAccess_Indicator]
              FROM [BuildMaster].[dbo].[Credentials] BC
              LEFT OUTER JOIN [Otter].[dbo].[Credentials] OC
                           ON BC.[Credential_Name] = OC.[Credential_Name]
              LEFT OUTER JOIN [BuildMaster].[dbo].[Environments] BE
                           ON BC.[Environment_Id] = BE.[Environment_Id]
              LEFT OUTER JOIN [Otter].[dbo].[Environments] OE
                           ON BE.[Environment_Name] = OE.[Environment_Name]
             WHERE OC.[Credential_Id] IS NULL
            
            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