mirror of
https://github.com/hanzoai/iam.git
synced 2026-11-19 18:37:16 +00:00
This repo is public and its LICENSE called the source "confidential and
proprietary ... All rights reserved". Public visibility contradicts
confidentiality, and HIP-0130 puts `iam` in the OSS core tier. The declaration
now matches both.
LICENSE-APACHE and LICENSE-MIT carry the canonical texts, unedited —
LICENSE-APACHE is byte-identical to apache.org/licenses/LICENSE-2.0.txt
(sha256 cfc7749b…, 11358 bytes, blob d645695). LICENSE declares the pair.
LICENSE-MIT carries the copyright line the notice requires.
249 Go files led with `// Copyright 2026 Hanzo AI, Inc. All rights reserved.`
— the classic proprietary reservation, and a per-file contradiction of the new
grant. Each now carries `// SPDX-License-Identifier: MIT OR Apache-2.0`. The
word "confidential" survives untouched in the OIDC sense (confidential client),
which is protocol vocabulary, not a licence claim.
There is nothing else to declare: `go.mod` has no licence field and this repo
ships no Cargo/npm/PyPI manifest.
Relicensing is ours alone to do. The tree is original work, not a fork:
`fork: false` with no parent, its own root commit, and no Casdoor-lineage tag
is an ancestor of `main`. The retired Casdoor fork is `hanzoai/iam-v1`; the
provenance note in LICENSE names it, restoring the vendor name a clean-room
assertion needs in order to say what it is clean of.
Build, vet and all 29 test packages green.
Co-authored-by: Hanzo Dev <[email protected]>
46 lines
1.7 KiB
Go
46 lines
1.7 KiB
Go
// Copyright 2026 Hanzo AI, Inc.
|
|
// SPDX-License-Identifier: MIT OR Apache-2.0
|
|
|
|
package main
|
|
|
|
import (
|
|
"os"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
// The module path github.com/hanzoai/iam carries two histories. Every tag below
|
|
// v1.32.0 published the Casdoor-derived tree (Beego/xorm, controllers/); v1.32.0
|
|
// and above publish this tree (zip/orm, internal/). Same import path, no signal:
|
|
// `go get github.com/hanzoai/[email protected]` is a lineage swap that still compiles.
|
|
//
|
|
// The Casdoor versions are preserved at github.com/hanzoai/iam-v1. Deleting their
|
|
// tags here cannot un-publish them — proxy.golang.org caches module versions
|
|
// immutably, and it already holds them — so the retraction below is what actually
|
|
// tells every resolver, proxied or direct, that those versions are not this module.
|
|
//
|
|
// Retraction is per-module, so every module path this repository publishes needs
|
|
// its own. github.com/hanzoai/iam/pkg/iam — the Casdoor-only Embed + Mount
|
|
// submodule, absent from this tree — is published under the canonical prefix and
|
|
// is not reached by the root retraction above.
|
|
//
|
|
// This test fails if either retraction is ever dropped. Add a row when this
|
|
// repository starts publishing another module path.
|
|
func TestCasdoorLineageRetracted(t *testing.T) {
|
|
for _, m := range []struct{ gomod, retract string }{
|
|
{"go.mod", "retract [v1.0.0, v1.31.37]"},
|
|
{"pkg/iam/go.mod", "retract [v1.18.0, v1.18.7]"},
|
|
} {
|
|
t.Run(m.gomod, func(t *testing.T) {
|
|
b, err := os.ReadFile(m.gomod)
|
|
if err != nil {
|
|
t.Fatalf("read %s: %v", m.gomod, err)
|
|
}
|
|
if !strings.Contains(string(b), m.retract) {
|
|
t.Errorf("%s is missing %q\n\nWithout it, that module path silently "+
|
|
"resolves to the Casdoor tree instead of this one.", m.gomod, m.retract)
|
|
}
|
|
})
|
|
}
|
|
}
|