Automatic removal of Access Keys from repositories in Bitbucket Data Center

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問


Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

要約:

Access keys, which serve as unique identifiers allowing secure access to particular repositories for GIT operations are removed on a regular basis.

Environment:

  • Bitbucket Data Center and Server version 8.3.0 and above.
  • Plugin "Repository Templates for Bitbucket" Version 3.8.4.

Diagnosis:

  • The atlassian-bitbucket.log will have the following events.
2023-06-08 20:16:42,065 INFO  [Caesium-1-4]  c.m.s.t.job.ResetSettingsJobRunner REPOTEMPLATES: Starting settings reset for project PROJECT1...
2023-06-08 20:16:42,077 INFO  [Caesium-1-4]  c.m.s.t.reposettings.ops.SshKeysOp REPOTEMPLATES: will reset settings of type 'Access keys settings' in 'PROJECT1 / repo5' from 'PROJECT1 / repo6'
2023-06-08 20:16:42,129 DEBUG [Caesium-1-4]  c.a.s.i.e.TransactionAwareEventPublisher Deferring publishing for RepositoryPermissionRevokedEvent until AFTER_COMMIT
2023-06-08 20:16:42,130 DEBUG [Caesium-1-4]  c.a.b.i.k.s.DefaultSshAccessKeyService Access to repository "PRO1/repo5[1]" has been revoked for service user Access Key User - user1
2023-06-08 20:16:42,130 DEBUG [Caesium-1-4]  c.a.s.i.e.TransactionAwareEventPublisher Deferring publishing for SshAccessKeyRevokedEvent until AFTER_COMMIT
2023-06-08 20:16:42,141 DEBUG [Caesium-1-4]  c.a.s.i.e.TransactionAwareEventPublisher Deferring publishing for SshKeyDeletedEvent until AFTER_COMMIT

原因:

Click Here to get more information about Repository Templates for Bitbucket plugin.

  • This situation occurs due to the third-party plugin "Repository Templates for Bitbucket", which has the ability to replace repository settings like access keys, repository permissions, branch permissions, etc. with corresponding settings configured in a repository template.
  • If a cron expression is defined in the template then the repository settings will be replaced at regular intervals. 
  • In this particular case, the actual access keys of repositories(repo5) are dropped and replaced by the access keys of the repository template(repo6). Additionally, if the Repository template doesn't have any keys, it gives the user the impression that keys are being removed automatically.

ソリューション

  • Look for the Repository templates option under the ADD-ONS tab in affected project's setting and uncheck the access keys option.
  • Add the access key again in the repository.


Kindly reach out to Atlassian support if anything goes wrong or need assistance in understanding the procedure. 

最終更新日 2023 年 7 月 11 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.