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

Authenticator container writes version to log on startup #93

Closed
1 task
izgeri opened this issue Mar 27, 2020 · 4 comments
Closed
1 task

Authenticator container writes version to log on startup #93

izgeri opened this issue Mar 27, 2020 · 4 comments

Comments

@izgeri
Copy link
Contributor

izgeri commented Mar 27, 2020

Is your feature request related to a problem? Please describe.

Right now to determine authenticator version we rely on the SHA256 hashes available via docker inspect, but this is making it difficult to determine the exact image that was used - especially if the image wasn't taken from dockerhub directly.

Describe the solution you would like

In cyberark/secretless-broker#944 we added our current implementation of printing the Secretless version on startup - adding a similar startup line to the authenticator container would also be nice.

Note: it should not be part of the public packages of the authenticator - adding it there would mean that every tool that is based on those packages would also print the authenticator version, which would be confusing and redundant.

AC:

  • The authenticator container prints the version on startup. For tag builds, the version should print as the semver tag (eg v1.2.3). For dev builds, the version should print as the semver tag + the commit hash (eg v1.2.3-{hash})
@InbalZilberman
Copy link

@izgeri Can you please explain the note about the public packages?

@izgeri
Copy link
Contributor Author

izgeri commented Mar 27, 2020

@InbalZilberman the project has a main.go file that invokes the internal / public golang packages to start up and run the authenticator.

Secretless and the k8s secrets provider both import the public golang packages of this project to run the authenticator as part of their workflows.

Looking at the main.go for this project now, it probably makes sense to log a startup message and print the version as one of the first steps in main.go. This has the added benefit of avoiding the problem I am concerned with, which is that Secretless will start and log "Starting Secretless vx.y.z" and then log "Starting authenticator va.b.c", which I think would be a little confusing (and as I noted, redundant, since Secretless refers to the authenticator library version it's using in its NOTICES and go.mod).

Hope this makes sense, but please feel free to ask follow-up questions if any of it is not clear.

@izgeri
Copy link
Contributor Author

izgeri commented Apr 6, 2020

@orenbm this is not available in a published release yet - right? I don't think we should close it until it's available to end users, since they can't actually benefit from this change yet

orenbm added a commit that referenced this issue Apr 7, 2020
### Added
- Added ability for authn client to print its version upon startup (#93)
@orenbm
Copy link
Member

orenbm commented Apr 7, 2020

Released a version now, thanks!

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

No branches or pull requests

5 participants