Skip to content

Auth licensing#115

Open
bosvos wants to merge 4 commits into
masterfrom
nexus-5339-license-build
Open

Auth licensing#115
bosvos wants to merge 4 commits into
masterfrom
nexus-5339-license-build

Conversation

@bosvos

@bosvos bosvos commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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

License client v0.0.4
Dev vs Prod modes
Update build script
Documentation update
NEXUS-5339

@FritzOnFire FritzOnFire left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a quick scan, still need to look at the README.md, and the new modules that you have created.

Comment thread go.mod Outdated
module github.com/IMQS/imqsauth

go 1.22.7
go 1.24.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. We really need to get going on at least go 1.25...

Comment thread go.mod Outdated
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Comment thread imqs-build.rb
# '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 ." )

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...

Comment thread imqsauth.go Outdated
serviceconfig "github.com/IMQS/serviceconfigsgo"
)


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this extra line.

Comment thread imqsauth.go Outdated
Comment on lines 98 to 100
ic := &auth.ImqsCentral{}

ic.Config = &auth.Config{}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally would keep these to lines together... but I guess I would rather have written it like this in the first place

Suggested change
ic := &auth.ImqsCentral{}
ic.Config = &auth.Config{}
ic := &auth.ImqsCentral{
Config: &auth.Config{},
}

Comment thread imqsauth.go Outdated
if createCentral {
var err error
ic.Central, err = authaus.NewCentralFromConfig(&ic.Config.Authaus)
ic.Central.Log.Level = log.Debug

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you for got some development logging. We really should add LogLevel string to Config in config.go and replace this line with

Suggested change
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.

@LeonLeibbrandt LeonLeibbrandt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

bosvos added 3 commits June 18, 2026 15:12
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.
@bosvos
bosvos force-pushed the nexus-5339-license-build branch from b8d94d8 to 42784d7 Compare June 18, 2026 21:37
@bosvos
bosvos requested a review from FritzOnFire June 18, 2026 21:39

@FritzOnFire FritzOnFire left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 :(.

Comment on lines +47 to +48
echo "${{ secrets.KEY_BIN }}" | base64 --decode > ./key.bin
echo "${{ secrets.SERVER_BIN }}" | base64 --decode > ./server.bin

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this feels pretty clean.

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

Successfully merging this pull request may close these issues.

3 participants