Skip to content

Commit ff84c04

Browse files
Add Repository Bearer Authentication
Signed-off-by: Valentijn Scholten <valentijnscholten@gmail.com>
1 parent f051f1b commit ff84c04

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* This file is part of Dependency-Track.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
* SPDX-License-Identifier: Apache-2.0
17+
* Copyright (c) OWASP Foundation. All Rights Reserved.
18+
*/
19+
package org.dependencytrack.upgrade.v4130;
20+
21+
import java.sql.Connection;
22+
23+
import alpine.common.logging.Logger;
24+
import alpine.persistence.AlpineQueryManager;
25+
import alpine.server.upgrade.AbstractUpgradeItem;
26+
import alpine.server.util.DbUtil;
27+
28+
public class v4130Updater extends AbstractUpgradeItem {
29+
30+
private static final Logger LOGGER = Logger.getLogger(v4130Updater.class);
31+
32+
@Override
33+
public String getSchemaVersion() {
34+
return "4.13.0";
35+
}
36+
37+
@Override
38+
public void executeUpgrade(final AlpineQueryManager qm, final Connection connection) throws Exception {
39+
LOGGER.info("Adding BEARERTOKEN column to REPOSITORY table.");
40+
DbUtil.executeUpdate(connection, "ALTER TABLE \"REPOSITORY\" ADD \"BEARERTOKEN\" VARCHAR(255)");
41+
}
42+
43+
}

0 commit comments

Comments
 (0)