Auth licensing#115
Conversation
License client v0.0.4 Dev vs Prod modes Update build script Documentation update NEXUS-5339
FritzOnFire
left a comment
There was a problem hiding this comment.
Did a quick scan, still need to look at the README.md, and the new modules that you have created.
| module github.com/IMQS/imqsauth | ||
|
|
||
| go 1.22.7 | ||
| go 1.24.0 |
There was a problem hiding this comment.
Ummmm... this does not match The Version Mary https://imqssoftware.atlassian.net/wiki/spaces/AR/pages/40665971/The+Version+Mary. Which is what our CI and Dev machines have.
There was a problem hiding this comment.
Cool. We really need to get going on at least go 1.25...
| github.com/IMQS/gowinsvc v1.2.0 | ||
| github.com/IMQS/log v1.4.0 | ||
| github.com/IMQS/licenseserver v0.0.4 | ||
| github.com/IMQS/log v1.5.1 |
There was a problem hiding this comment.
Unfortunatly, because of this commit IMQS/log@47a4f46, we can not upgrade our logger past v1.4.0. Please revert this upgrade.
(That commit makes it impossible for a service to have more than one logger, which is quite common among our go services)
| # 'build' exists solely for CI integration. We can't use "prepare" in that case, because "../out/bin" doesn't exist on a CI build. | ||
| # OK.. this is now a legacy thing, after having creating the "copy_out" phase. | ||
| exec_or_die( "go build imqsauth.go" ) | ||
| exec_or_die( "go build -o imqsauth.exe -tags prod ." ) |
There was a problem hiding this comment.
One day, I will create a ticket for a junior to go though all of our go services and make sure they all have a main.go file instead of a file that matches the repo name...
| serviceconfig "github.com/IMQS/serviceconfigsgo" | ||
| ) | ||
|
|
||
|
|
There was a problem hiding this comment.
Please remove this extra line.
| ic := &auth.ImqsCentral{} | ||
|
|
||
| ic.Config = &auth.Config{} |
There was a problem hiding this comment.
I personally would keep these to lines together... but I guess I would rather have written it like this in the first place
| ic := &auth.ImqsCentral{} | |
| ic.Config = &auth.Config{} | |
| ic := &auth.ImqsCentral{ | |
| Config: &auth.Config{}, | |
| } |
| if createCentral { | ||
| var err error | ||
| ic.Central, err = authaus.NewCentralFromConfig(&ic.Config.Authaus) | ||
| ic.Central.Log.Level = log.Debug |
There was a problem hiding this comment.
I think you for got some development logging. We really should add LogLevel string to Config in config.go and replace this line with
| ic.Central.Log.Level = log.Debug | |
| if ic.Config.LogLevel != "" { | |
| loglevel, err := log.ParseLevel(ic.Config.LogLevel) | |
| if err != nil { | |
| panic(fmt.Errorf("Could not parse the log level: %v", err)) | |
| } | |
| ic.Central.Log.Level = loglevel | |
| } |
This is pretty much how we do it on our other services, except I push pretty hard to making the log as soon as possible (right after getting the config from config service), and in some services I have gotten around to overriding the log level with a command line argument, which is handy when you want to configure our IDE to always have debug logging, without changing the config.
Update GitHub actions for license keys
Fix Docker machine id Update to licenseserver v1.0.1 to downgrade log to v1.4.0 Update README.md to list the new volume mapping requirement.
b8d94d8 to
42784d7
Compare
FritzOnFire
left a comment
There was a problem hiding this comment.
LGTM.
I wanted to review the licenseserver repo as well, but it seems that I don't have enough time to review that as well :(.
| echo "${{ secrets.KEY_BIN }}" | base64 --decode > ./key.bin | ||
| echo "${{ secrets.SERVER_BIN }}" | base64 --decode > ./server.bin |
There was a problem hiding this comment.
Nice, this feels pretty clean.
Windows build only
Docker build to be added after further discussion
PR checks expected to fail at the moment
License client v0.0.4
Dev vs Prod modes
Update build script (Jenkins BuildRC already updated)
Documentation update
NEXUS-5339