Skip to content

Commit 5d06db4

Browse files
committed
Enable Node ACL based on ECF_PERMISSIONS
1 parent 4fb1d10 commit 5d06db4

81 files changed

Lines changed: 2117 additions & 689 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Viewer/ecflowUI/src/VTriggerAttr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ namespace detail {
152152

153153
template <typename STREAM>
154154
void render_expression(Expression* e, const Node& node, STREAM& stream) {
155-
auto ctx = ecf::Context::make_for(PrintStyle::DEFS);
155+
auto ctx = ecf::FormatContext::make_for(PrintStyle::DEFS);
156156

157157
ecf::Indent l1(ctx);
158158

libs/CMakeLists.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ set(srcs
5757
# Base -- Headers
5858
base/src/ecflow/base/AbstractClientEnv.hpp
5959
base/src/ecflow/base/AbstractServer.hpp
60-
base/src/ecflow/base/Algorithms.hpp
6160
base/src/ecflow/base/Authentication.hpp
6261
base/src/ecflow/base/AuthenticationDetails.hpp
6362
base/src/ecflow/base/Authorisation.hpp
@@ -340,6 +339,7 @@ set(srcs
340339
node/src/ecflow/node/ClientSuiteMgr.hpp
341340
node/src/ecflow/node/ClientSuites.hpp
342341
node/src/ecflow/node/CmdContext.hpp
342+
node/src/ecflow/node/AuthorisationContext.hpp
343343
node/src/ecflow/node/Defs.hpp
344344
node/src/ecflow/node/DefsDelta.hpp
345345
node/src/ecflow/node/DefsTreeVisitor.hpp
@@ -366,11 +366,11 @@ set(srcs
366366
node/src/ecflow/node/NodeAlgorithms.hpp
367367
node/src/ecflow/node/NodeContainer.hpp
368368
node/src/ecflow/node/NodeFwd.hpp
369+
node/src/ecflow/node/NodePathAlgorithms.hpp
369370
node/src/ecflow/node/NodeState.hpp
370371
node/src/ecflow/node/NodeStats.hpp
371372
node/src/ecflow/node/NodeTreeVisitor.hpp
372373
node/src/ecflow/node/Operations.hpp
373-
node/src/ecflow/node/Permissions.hpp
374374
node/src/ecflow/node/ResolveExternsVisitor.hpp
375375
node/src/ecflow/node/ServerState.hpp
376376
node/src/ecflow/node/Signal.hpp
@@ -417,6 +417,10 @@ set(srcs
417417
node/src/ecflow/node/parser/VariableParser.hpp
418418
node/src/ecflow/node/parser/VerifyParser.hpp
419419
node/src/ecflow/node/parser/ZombieAttrParser.hpp
420+
node/src/ecflow/node/permissions/ActivePermissions.hpp
421+
node/src/ecflow/node/permissions/Allowed.hpp
422+
node/src/ecflow/node/permissions/Permission.hpp
423+
node/src/ecflow/node/permissions/Permissions.hpp
420424
# Node -- Sources
421425
node/src/ecflow/node/Alias.cpp
422426
node/src/ecflow/node/Attr.cpp
@@ -425,6 +429,7 @@ set(srcs
425429
node/src/ecflow/node/ClientSuiteMgr.cpp
426430
node/src/ecflow/node/ClientSuites.cpp
427431
node/src/ecflow/node/CmdContext.cpp
432+
node/src/ecflow/node/AuthorisationContext.cpp
428433
node/src/ecflow/node/Defs.cpp
429434
node/src/ecflow/node/DefsDelta.cpp
430435
node/src/ecflow/node/EcfFile.cpp
@@ -456,7 +461,6 @@ set(srcs
456461
node/src/ecflow/node/NodeStats.cpp
457462
node/src/ecflow/node/NodeTime.cpp
458463
node/src/ecflow/node/NodeTreeVisitor.cpp
459-
node/src/ecflow/node/Permissions.cpp
460464
node/src/ecflow/node/ResolveExternsVisitor.cpp
461465
node/src/ecflow/node/ServerState.cpp
462466
node/src/ecflow/node/Signal.cpp
@@ -498,6 +502,10 @@ set(srcs
498502
node/src/ecflow/node/parser/VariableParser.cpp
499503
node/src/ecflow/node/parser/VerifyParser.cpp
500504
node/src/ecflow/node/parser/ZombieAttrParser.cpp
505+
node/src/ecflow/node/permissions/ActivePermissions.cpp
506+
node/src/ecflow/node/permissions/Allowed.cpp
507+
node/src/ecflow/node/permissions/Permission.cpp
508+
node/src/ecflow/node/permissions/Permissions.cpp
501509

502510
# Server -- Headers
503511
server/src/ecflow/server/AuthenticationService.hpp

libs/base/CMakeLists.txt

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ set(test_srcs
2424
test/TestInLimitParsing.cpp
2525
test/TestLogCmd.cpp
2626
test/TestMeterCmd.cpp
27-
test/TestPermissions.cpp
2827
test/TestProgramOptions.cpp
2928
test/TestQueryCmd.cpp
3029
test/TestQueueCmd.cpp
@@ -60,30 +59,6 @@ target_clangformat(u_base
6059
CONDITION ENABLE_TESTS
6160
)
6261

63-
set(test_srcs
64-
# Sources
65-
test/TestAlgorithms.cpp
66-
)
67-
68-
ecbuild_add_test(
69-
TARGET
70-
u_base_algorithms
71-
LABELS
72-
unit nightly
73-
SOURCES
74-
${test_srcs}
75-
LIBS
76-
ecflow_all
77-
test_scaffold
78-
test_harness.base
79-
Threads::Threads
80-
$<$<BOOL:${OPENSSL_FOUND}>:OpenSSL::SSL>
81-
)
82-
target_clangformat(u_base_algorithms
83-
CONDITION ENABLE_TESTS
84-
)
85-
86-
8762
# The following is not technically a test (as it makes no checks),
8863
# but a tool to measure the time it takes to generate a job file
8964
if (ENABLE_ALL_TESTS)

libs/base/src/ecflow/base/AuthenticationDetails.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ inline authentication_t verify_user_authentication_rules(const AbstractServer& s
7272
return authentication_t::success("Authentication (user command) successful");
7373
}
7474

75-
return authentication_t::failure("Authentication (user command) failed, due to: Incorrect credentials detected");
75+
return authentication_t::failure("Authentication (user command) failed, due to: Incorrect credentials for (" +
76+
command.identity().username().value() + " / <omitted>)");
7677
}
7778

7879
template <typename COMMAND>

0 commit comments

Comments
 (0)