buildbot: instantiate fully LixSystemsOAuth2

Signed-off-by: Raito Bezarius <raito@lix.systems>
This commit is contained in:
raito 2024-03-02 16:23:03 +01:00
parent beea96da2c
commit 5f7b3e0cdb

View file

@ -37,11 +37,12 @@ SKIPPED_BUILDER_NAME = "skipped-builds"
log = Logger()
class LixSystemsOAuth2(OAuth2Auth):
name = 'identity-lix-systems'
faIcon = '...'
resourceEndpoint = ''
authUri = ''
tokenUri = ''
name = 'Lix'
faIcon = 'fa-login'
resourceEndpoint = "https://identity.lix.systems"
# is passing scope necessary?
authUri = 'https://identity.lix.systems/realms/lix-project/protocol/openid-connect/auth'
tokenUri = 'https://identity.lix.systems/realms/lix-project/protocol/openid-connect/token'
class BuildbotNixError(Exception):
pass
@ -722,6 +723,7 @@ class GerritNixConfigurator(ConfiguratorBase):
# self.outputs_path,
# )
config["change_source"] = self.gerrit_change_source
config["workers"].append(worker.LocalWorker(SKIPPED_BUILDER_NAME))
config["services"].append(
reporters.GerritStatusPush(self.gerrit_server, self.gerrit_user,
@ -742,4 +744,4 @@ class GerritNixConfigurator(ConfiguratorBase):
config["www"]["plugins"].update(dict(base_react={}))
if "auth" not in config["www"]:
config["www"]["auth"] = LixSystemsOAuth2()
config["www"]["auth"] = LixSystemsOAuth2('buildbot', read_secret_file('buildbot-oauth2-secret'), autologin=True)