Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leading slash in SOURCE_GITLAB_FILEPATH fails without warning #90

Open
sverrehu opened this issue Sep 1, 2020 · 0 comments
Open

Leading slash in SOURCE_GITLAB_FILEPATH fails without warning #90

sverrehu opened this issue Sep 1, 2020 · 0 comments

Comments

@sverrehu
Copy link

sverrehu commented Sep 1, 2020

Using SOURCE_GITLAB_FILEPATH="/foo/bar.csv" with a leading slash, and a non-existing file, makes Kafka Security Manager log the following:

[2020-09-01 14:00:35,365] INFO No changes were detected in the ACL file /foo/bar.csv. Skipping ....  (com.github.simplesteph.ksm.source.GitLabSourceAcl)

even though there are no foo/bar.csv in the repository. I guess this is caused by GitLabSourceAcl.scala including $filepath verbatim in the GitLab API URL, thus requesting:

https://gitlab.com/api/v4/projects/.../repository/files//foo/bar.csv

GitLab will return a 308 redirect to a new URL leading to 404, but I guess this redirect is not followed, and that the <400 status is not flagged as en error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant