fix(ingest): nifi - replace hardcode password with config variable (#3902)

Co-authored-by: Shirshanka Das <shirshanka@apache.org>
This commit is contained in:
Hoang-Vu Le 2022-01-18 06:36:37 +07:00 committed by GitHub
parent 80c46f24ac
commit d5ef7cefa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -310,7 +310,10 @@ class NifiSource(Source):
), "Config password is required for SINGLE_USER auth" ), "Config password is required for SINGLE_USER auth"
token_response = self.session.post( token_response = self.session.post(
url=urljoin(self.config.site_url, TOKEN_ENDPOINT), url=urljoin(self.config.site_url, TOKEN_ENDPOINT),
data={"username": self.config.username, "password": "admin@datahub"}, data={
"username": self.config.username,
"password": self.config.password,
},
) )
if not token_response.ok: if not token_response.ok:
logger.error("Failed to get token") logger.error("Failed to get token")