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

DO NOT MERGE UNTIL EOY] EOY license fixes 1.15.x #24385

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .copywrite.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ schema_version = 1

project {
license = "BUSL-1.1"
copyright_year = 2023
copyright_year = 2024

# (OPTIONAL) A list of globs that should not have copyright/license headers.
# Supports doublestar glob patterns for more flexibility in defining which
Expand All @@ -12,10 +12,5 @@ project {
"ui/node_modules/**",
"enos/modules/k8s_deploy_vault/raft-config.hcl",
"plugins/database/postgresql/scram/**",
# licensed under MPL - ignoring for now until the copywrite tool can support
# multiple licenses per repo.
"sdk/**",
"api/**",
"shamir/**'"
]
}
24 changes: 24 additions & 0 deletions .github/workflows/copywrite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Check Copywrite Headers

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches:
- main
- release/**

jobs:
copywrite:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: hashicorp/setup-copywrite@867a1a2a064a0626db322392806428f7dc59cb3e # v1.1.2
name: Setup Copywrite
with:
version: v0.16.4
archive-checksum: c299f830e6eef7e126a3c6ef99ac6f43a3c132d830c769e0d36fa347fa1af254
- name: Check Header Compliance
run: make ci-copywriteheaders
permissions:
contents: read
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved.
Parameters

Licensor: HashiCorp, Inc.
Licensed Work: Vault Version 1.15.0 or later. The Licensed Work is (c) 2023
Licensed Work: Vault Version 1.15.0 or later. The Licensed Work is (c) 2024
HashiCorp, Inc.
Additional Use Grant: You may make production use of the Licensed Work, provided
Your use does not include offering the Licensed Work to third
Expand Down
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -316,3 +316,13 @@ ci-get-version-package:
.PHONY: ci-prepare-legal
ci-prepare-legal:
@$(CURDIR)/scripts/ci-helper.sh prepare-legal

.PHONY: ci-copywriteheaders
ci-copywriteheaders:
copywrite headers --plan
echo $(CURDIR)
pwd
# Special case for MPL headers in /api, /sdk, and /shamir
cd api && $(CURDIR)/scripts/copywrite-exceptions.sh
cd sdk && $(CURDIR)/scripts/copywrite-exceptions.sh
cd shamir && $(CURDIR)/scripts/copywrite-exceptions.sh
9 changes: 9 additions & 0 deletions api/.copywrite.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

schema_version = 1

project {
license = "MPL-2.0"
copyright_year = 2024

header_ignore = []
}
4 changes: 4 additions & 0 deletions api/secret_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0


package api

import (
Expand Down
3 changes: 3 additions & 0 deletions audit/sink_wrapper.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1

package audit

import (
Expand Down
3 changes: 3 additions & 0 deletions builtin/logical/database/schedule/schedule.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1

package schedule

import (
Expand Down
3 changes: 3 additions & 0 deletions command/server/config_stubs_oss.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1

//go:build !enterprise

package server
Expand Down
3 changes: 3 additions & 0 deletions command/server/tls_util_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1

package server

import (
Expand Down
3 changes: 3 additions & 0 deletions http/handler_stubs_oss.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1

//go:build !enterprise

package http
Expand Down
14 changes: 14 additions & 0 deletions scripts/copywrite-exceptions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

# Used as a stopgap for copywrite bot in MPL-licensed subdirs, detects BUSL licensed
# headers and deletes them, then runs the copywrite bot to utilize local subdir config
# to inject correct headers.

find . -type f -name '*.go' | while read line; do
if grep "SPDX-License-Identifier: BUSL-1.1" $line; then
sed -i '/SPDX-License-Identifier: BUSL-1.1/d' $line
sed -i '/Copyright (c) HashiCorp, Inc./d' $line
fi
done

copywrite headers --plan
9 changes: 9 additions & 0 deletions sdk/.copywrite.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

schema_version = 1

project {
license = "MPL-2.0"
copyright_year = 2024

header_ignore = []
}
4 changes: 4 additions & 0 deletions sdk/helper/testcluster/consts.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0


package testcluster

const (
Expand Down
4 changes: 4 additions & 0 deletions sdk/helper/testcluster/replication.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0


package testcluster

import (
Expand Down
4 changes: 4 additions & 0 deletions sdk/helper/testhelpers/output.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0


package testhelpers

import (
Expand Down
4 changes: 4 additions & 0 deletions sdk/helper/testhelpers/output_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0


package testhelpers

import (
Expand Down
4 changes: 4 additions & 0 deletions sdk/logical/events_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0


package logical

import (
Expand Down
9 changes: 9 additions & 0 deletions shamir/.copywrite.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

schema_version = 1

project {
license = "MPL-2.0"
copyright_year = 2024

header_ignore = []
}
5 changes: 5 additions & 0 deletions ui/app/components/resultant-acl-banner.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}

<Hds::Alert @type="inline" @color="critical" data-test-resultant-acl-banner as |A|>
<A.Title>Resultant ACL check failed</A.Title>
<A.Description>
Expand Down
5 changes: 5 additions & 0 deletions ui/app/components/resultant-acl-banner.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/

import { service } from '@ember/service';
import Component from '@glimmer/component';

Expand Down
5 changes: 5 additions & 0 deletions ui/app/models/kv/config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/

import Model, { attr } from '@ember-data/model';
import lazyCapabilities, { apiPath } from 'vault/macros/lazy-capabilities';
import { withFormFields } from 'vault/decorators/model-form-fields';
Expand Down
5 changes: 5 additions & 0 deletions ui/app/styles/components/secrets-engines-card.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/

.secrets-engines-card {
min-height: 480px;
}
5 changes: 5 additions & 0 deletions ui/app/templates/components/clients/no-data.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}

{{#if (eq @config.enabled "On")}}
<EmptyState
@title="No data received {{if @dateRangeMessage @dateRangeMessage}}"
Expand Down
5 changes: 5 additions & 0 deletions ui/app/templates/components/dashboard/client-count-card.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}

<Hds::Card::Container @hasBorder={{true}} class="has-padding-l" data-test-card="client-count">
<div class="is-flex-between">
<h3 class="title is-4 has-bottom-margin-xxs" data-test-client-count-title>
Expand Down
5 changes: 5 additions & 0 deletions ui/app/templates/components/dashboard/learn-more-card.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}

<Hds::Card::Container @hasBorder={{true}} class="has-padding-l" data-test-card="learn-more">
<h3 class="title is-4 has-bottom-margin-xxs" data-test-learn-more-title>Learn more</h3>
<div class="sub-text" data-test-learn-more-subtext>
Expand Down
5 changes: 5 additions & 0 deletions ui/app/templates/components/dashboard/overview.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}

<Dashboard::VaultVersionTitle @version={{@version}} />

<div class="has-bottom-margin-xl">
Expand Down
5 changes: 5 additions & 0 deletions ui/app/templates/components/dashboard/quick-actions-card.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}

<Hds::Card::Container @hasBorder={{true}} class="has-padding-l" data-test-card="quick-actions">
<h3 class="title is-4">Quick actions</h3>
{{#if this.filteredSecretEngines}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}

<Hds::Card::Container
@hasBorder={{true}}
class="has-padding-l {{if this.filteredSecretsEngines 'secrets-engines-card'}}"
Expand Down
5 changes: 5 additions & 0 deletions ui/app/templates/components/dashboard/survey-link-text.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}

<div class="has-top-padding-xs has-bottom-padding-xs has-top-margin-m" data-test-feedback-form>
<small>
Don't see what you're looking for on this page? Let us know via our
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}

<Hds::Card::Container @hasBorder={{true}} class="has-padding-l" data-test-card="configuration-details">
<h3 class="title is-4" data-test-configuration-details-title>Configuration details</h3>

Expand Down
5 changes: 5 additions & 0 deletions ui/app/templates/components/dashboard/vault-version-title.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}

<PageHeader as |p|>
<p.levelLeft>
<h1 class="title is-3" data-test-dashboard-version-header>
Expand Down
5 changes: 5 additions & 0 deletions ui/app/templates/vault/cluster/dashboard.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}

<Dashboard::Overview
@replication={{this.model.replication}}
@secretsEngines={{this.model.secretsEngines}}
Expand Down
5 changes: 5 additions & 0 deletions ui/app/transforms/mount-visibility.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/

import Transform from '@ember-data/serializer/transform';

/**
Expand Down
5 changes: 5 additions & 0 deletions ui/lib/core/addon/components/copy-secret-dropdown.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}

{{! @onWrap is recommend to be a concurrency task! see <Page::Secret::Details> in KV addon for example }}
<BasicDropdown @class="popup-menu" @horizontalPosition="auto-right" @verticalPosition="below" @onClose={{@onClose}} as |D|>
<D.Trigger data-test-copy-menu-trigger class="toolbar-link {{if D.isOpen 'is-active'}}" @htmlTag="button">
Expand Down
5 changes: 5 additions & 0 deletions ui/lib/core/addon/components/filter-input.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}

<div class="field">
<p class="control has-icons-left">
<input
Expand Down
5 changes: 5 additions & 0 deletions ui/lib/core/addon/components/secrets-engine-mount-config.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}

<div ...attributes>
<ToggleButton
@isOpen={{this.showConfig}}
Expand Down
5 changes: 5 additions & 0 deletions ui/lib/core/addon/components/secrets-engine-mount-config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/

import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';

Expand Down
5 changes: 5 additions & 0 deletions ui/lib/core/addon/utils/sanitize-path.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/

export function sanitizePath(path) {
if (!path) return '';
//remove whitespace + remove trailing and leading slashes
Expand Down
5 changes: 5 additions & 0 deletions ui/lib/core/app/components/copy-secret-dropdown.js
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/

export { default } from 'core/components/copy-secret-dropdown';
5 changes: 5 additions & 0 deletions ui/lib/kv/addon/components/kv-delete-modal.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}

<button type="button" class="toolbar-link" {{on "click" (fn (mut this.modalOpen) true)}} data-test-kv-delete={{@mode}}>
{{yield}}
</button>
Expand Down
Loading
Loading