mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-28 17:49:08 +02:00
[proxy] Add a release-wired UBI image variant (#7464)
Add a UBI-based reverse-proxy image for the internal Red Hat certification requirement, without changing the existing image or deployment defaults. Includes non-root execution, licensing and image metadata, plus an AMD64 GoReleaser entry with separate UBI tags. Preflight and TLS/overlay checks passed. An intermittent shutdown exit error remains deferred; this stays draft pending maintainer testing.
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
// Prints the third-party terms for the prebuilt UI in dist/ to stdout.
|
||||
// Package versions come from package-lock.json and the license texts from an
|
||||
// installed node_modules (run `npm ci --ignore-scripts` first).
|
||||
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
||||
import { dirname, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const webDir = join(dirname(fileURLToPath(import.meta.url)), "..");
|
||||
|
||||
// Build tools whose own code is emitted into dist: tailwindcss generates the
|
||||
// preflight and utility CSS, vite injects its modulepreload polyfill.
|
||||
const bundledTooling = new Set(["node_modules/tailwindcss", "node_modules/vite"]);
|
||||
|
||||
// Inter ships as a font file rather than a package, so its OFL lives beside it.
|
||||
const staticTerms = [
|
||||
{
|
||||
title: "Inter 4.001 (git-66647c0bb), SIL Open Font License 1.1",
|
||||
file: "src/assets/fonts/OFL.txt",
|
||||
},
|
||||
];
|
||||
|
||||
const termPattern = /^(licen[cs]e|copying|notice|patents)/i;
|
||||
|
||||
function fail(message) {
|
||||
process.stderr.write(`${message}\n`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
function shippedPackages(lock) {
|
||||
return Object.entries(lock.packages)
|
||||
.filter(([path, meta]) => path !== "" && (!meta.dev || bundledTooling.has(path)))
|
||||
.sort(([a], [b]) => Number(a > b) - Number(a < b));
|
||||
}
|
||||
|
||||
function packageSection(path, meta) {
|
||||
const dir = join(webDir, path);
|
||||
const manifest = join(dir, "package.json");
|
||||
if (!existsSync(manifest)) {
|
||||
fail(`${path} is not installed; run npm ci --ignore-scripts in proxy/web`);
|
||||
}
|
||||
const installed = JSON.parse(readFileSync(manifest, "utf8"));
|
||||
if (installed.version !== meta.version) {
|
||||
fail(`${path} is ${installed.version}, package-lock.json pins ${meta.version}`);
|
||||
}
|
||||
|
||||
const terms = readdirSync(dir).filter((name) => termPattern.test(name)).sort();
|
||||
if (terms.length === 0) {
|
||||
fail(`no license terms found for ${path}`);
|
||||
}
|
||||
|
||||
const name = path.slice(path.lastIndexOf("node_modules/") + "node_modules/".length);
|
||||
return terms
|
||||
.map((term) => `=== ${name} ${meta.version} (${term}) ===\n\n${readFileSync(join(dir, term), "utf8")}`)
|
||||
.join("\n\n");
|
||||
}
|
||||
|
||||
const lock = JSON.parse(readFileSync(join(webDir, "package-lock.json"), "utf8"));
|
||||
const sections = shippedPackages(lock).map(([path, meta]) => packageSection(path, meta));
|
||||
for (const { title, file } of staticTerms) {
|
||||
sections.push(`=== ${title} ===\n\n${readFileSync(join(webDir, file), "utf8")}`);
|
||||
}
|
||||
|
||||
process.stdout.write(
|
||||
"Third-party terms for the prebuilt authentication UI in proxy/web/dist.\n" +
|
||||
"Generated from proxy/web/package-lock.json at release time.\n\n\n" +
|
||||
sections.join("\n\n\n") +
|
||||
"\n",
|
||||
);
|
||||
@@ -0,0 +1,92 @@
|
||||
Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION AND CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
Reference in New Issue
Block a user