Kea 2.7.8
default_credentials.cc
Go to the documentation of this file.
1// Copyright (C) 2024-2025 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#include <config.h>
9
10namespace isc {
11namespace data {
12
13const std::unordered_set<std::string>
15#ifndef IGNORE_KEA_DEFAULT_CREDENTIALS
16#ifndef ALLOW_KEATEST
17 "keatest",
18#endif
19 "1234", "*****"
20#endif
21#ifdef EXTRA_KEA_DEFAULT_CREDENTIALS
22 EXTRA_KEA_DEFAULT_CREDENTIALS
23#endif
24};
25
26void
27DefaultCredentials::check(const std::string& value) {
28 if (DEFAULT_CREDENTIALS.count(value)) {
30 "illegal use of a default value as credential");
31 }
32}
33
34} // end of isc::dhcp namespace
35} // end of isc namespace
Exception thrown on attempt to use a default credential.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
Defines the logger used by the top-level component of kea-lfc.
static const std::unordered_set< std::string > DEFAULT_CREDENTIALS
Default credentials.
static void check(const std::string &value)
Check if the value is a default credential.