Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
0aee794
[28] clang-format tweaks
SwooshyCueb Mar 10, 2026
7ab75f2
[28] Swap BOOST_FORCEINLINE for inline keyword
SwooshyCueb Mar 24, 2026
e15c06e
[163] Add option for message durability
SwooshyCueb Feb 24, 2026
fbca874
[186] Load configuration in setup function
SwooshyCueb Feb 24, 2026
329e230
[186] Maintain AMQP connection for entire operation
SwooshyCueb Feb 24, 2026
940023a
[184] Add SASL options
SwooshyCueb Mar 10, 2026
21aa935
[164] Add amqp_sender_durability_mode configuration option
SwooshyCueb Mar 10, 2026
000af29
[109] Split AMQP endpoint config into multiple parts
SwooshyCueb Mar 10, 2026
fd7a566
[106] Allow specifying multiple AMQP endpoints
SwooshyCueb Mar 12, 2026
789bca1
[28] Refactor amqp configuration into new class
SwooshyCueb Mar 18, 2026
cd8a4d7
[184] Add more connection options
SwooshyCueb Mar 18, 2026
567d185
[184] Add more sender options
SwooshyCueb Mar 18, 2026
ff03645
[184] Add SSL options
SwooshyCueb Mar 19, 2026
3332008
[184] Specify some connection properties
SwooshyCueb Mar 24, 2026
9e9b36b
[106,109,163,164,184,186,191] configuration documentation
SwooshyCueb Apr 13, 2026
787678a
[squash] README: add "Must be one of the following:"
SwooshyCueb Jun 12, 2026
0083f3a
[squash] README: add link to qpid-proton docs
SwooshyCueb Jun 12, 2026
4dc054c
[164] Accept `DELIVERIES` as equivalent to `UNSETTLED_STATE`
SwooshyCueb Apr 13, 2026
421a59f
[106,109] Add test for deprecated endpoint configuration
SwooshyCueb Apr 13, 2026
4646653
[109] Allow valid empty AMQP username/password
SwooshyCueb Apr 15, 2026
cd8d17f
[106,109,163,164,184] Allow explicitly unset configuration options
SwooshyCueb Apr 15, 2026
06b52e2
[186] Add configurable timeouts for offloaded operations
SwooshyCueb Apr 15, 2026
5746c45
[28] Use find instead of count/at for plugin_specific_configuration
SwooshyCueb Apr 15, 2026
e701367
[186] Bubble up message send exceptions from AMQP container thread
SwooshyCueb Apr 15, 2026
4405600
[28] Get copy of irods config instead of reference
SwooshyCueb Apr 16, 2026
70c17e2
[28] Log exceptions as errors
SwooshyCueb Apr 16, 2026
c83a24e
[106,109,163,164,184] Use previous config if new config is bad
SwooshyCueb Apr 27, 2026
95a7d06
[106,109,163,164,184] Create class for plugin configuration
SwooshyCueb Apr 27, 2026
a5ba63c
[106,109,163,164,184] Use keyword variables for configuration keys
SwooshyCueb Apr 28, 2026
a152dd2
[28] Use irods::KW_CFG_INSTANCE_NAME
SwooshyCueb Apr 28, 2026
181e20e
[106,109,163,164,184] Do not get numerical config values by reference
SwooshyCueb May 4, 2026
588bbb9
[109] Enforce amqp_path requirement
SwooshyCueb May 4, 2026
75a0234
[106,109,163,164,184] Avoid asterisk-dereferencing nlohmann primitives
SwooshyCueb May 4, 2026
0838d18
[106,109,163,164,184] Return better error codes from config load
SwooshyCueb May 5, 2026
a246ddb
[28] return INVALID_REGEXP if pep regex fails to compile
SwooshyCueb May 5, 2026
4870fce
[106,109,163,164,184] Add some additional type checks
SwooshyCueb May 5, 2026
a82cac7
[28] look at nlohmann-json exception id
SwooshyCueb May 5, 2026
8c8e3fb
[109] add leading slash to path fallback value
SwooshyCueb May 6, 2026
7db9378
[28] do not mark amqp_config as initialized if using fallback values
SwooshyCueb May 6, 2026
5382e1c
[184] Fix empty sasl mechanisms array handling
SwooshyCueb May 6, 2026
685ed36
[186] Return error if opening AMQP connection times out
SwooshyCueb May 12, 2026
e5d2fcb
[186] Avoid referencing out-of-scope variables in the work queues
SwooshyCueb May 12, 2026
1f7977e
[28] Skip subclassed unixfilesystem tests
SwooshyCueb May 25, 2026
3179c94
[106,109,163,164,184,186] add catch2 test for configuration loading
SwooshyCueb May 6, 2026
f18a959
[squash] DELIVERIES alias comment in test
SwooshyCueb Jun 12, 2026
a357cd3
[192] add failsafe configuration option
SwooshyCueb May 20, 2026
24c1d31
[squash] tweak configuration warning in readme
SwooshyCueb Jun 12, 2026
08f2868
[squash] error string tweaks
SwooshyCueb Jun 12, 2026
105c376
[28] Tweak for compiler/libstdc++ compatibility
SwooshyCueb May 28, 2026
31bae16
[28] add plugin name to unit test names
SwooshyCueb May 27, 2026
03170b5
[28] add unit tests to test hook (quick n dirty)
SwooshyCueb May 27, 2026
3d2dd8c
[squash] fix test hook typo
SwooshyCueb Jun 12, 2026
0e69492
[190] Set container ID
SwooshyCueb May 28, 2026
da8d552
[28] Add additional detail to log messages
SwooshyCueb May 28, 2026
f5ed970
[squash] becasue -> because
SwooshyCueb Jun 12, 2026
0d7b2e2
[28] Check return values from config and sender class methods
SwooshyCueb Jun 9, 2026
96ff88e
[squash] error string tweaks (pt2)
SwooshyCueb Jun 12, 2026
919f7d4
[NEW COMMITS START HERE] [28] Use case-insensitive parsing for enums
SwooshyCueb Jun 12, 2026
6fd5c20
[28] Bump plugin version number to 5.1.0
SwooshyCueb Apr 15, 2026
2afe889
[DROP] set log level in re cfg script
SwooshyCueb May 28, 2026
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
21 changes: 10 additions & 11 deletions .clang-format
Comment thread
alanking marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,19 @@ AlignConsecutiveBitFields: Consecutive
AlignConsecutiveDeclarations: None
AlignConsecutiveMacros: AcrossEmptyLinesAndComments
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: true
AlignOperands: AlignAfterOperator
AlignTrailingComments: false

AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
BinPackArguments: false
BinPackParameters: false
PackConstructorInitializers: CurrentLine

AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
Expand All @@ -58,9 +59,7 @@ AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes

BinPackArguments: false
BinPackParameters: false

BreakAfterAttributes: Leave
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: true
BreakBeforeInheritanceComma: true
Expand All @@ -84,9 +83,9 @@ BraceWrapping:
BeforeLambdaBody: false
BeforeWhile: true
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyNamespace: true
SplitEmptyRecord: true
SplitEmptyFunction: false
SplitEmptyNamespace: false
SplitEmptyRecord: false

#InsertBraces: false
#RemoveBracesLLVM: false
Expand Down
97 changes: 76 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ set(IRODS_MINIMUM_VERSION "4.90.0")
set(IRODS_MAXIMUM_VERSION "6.0.0")
find_package(IRODS "${IRODS_MINIMUM_VERSION}...<${IRODS_MAXIMUM_VERSION}" REQUIRED)

set(IRODS_PLUGIN_VERSION "5.0.1")
set(IRODS_PLUGIN_VERSION "5.1.0")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NTS: Update milestone.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just making sure: As far as we know, no interfaces have changed and no behavioral changes are considered breaking, right? In other words, no need for a major version with these changes?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new block-by-default failsafe mode could be considered a breaking change, though a configuration tweak would restore the previous behavior.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have zero concerns with this being a major release of the plugin, for the record.

that said, the behavior as i understand it today, is that if the AMQP endpoint was not happy... iRODS just stopped/blocked/appeared broken. So... this could be argued is a bugfix from a certain perspective.

I defer on the versioning thing. I think it's fine either way.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the explanation in #192, I think the failsafe mode is in fact making unintended-yet-desirable behavior into an official (and actually functioning) feature, and a configurable one. So, yes, in some sense it is in fact a bug fix. Anyway, it doesn't necessarily seem worthy of a major version bump after seeing these comments - minor seems fine.


set(IRODS_PACKAGE_REVISION "0")

set(IRODS_RULE_ENGINE_PLUGIN_NAME "audit_amqp")
set(IRODS_PLUGIN_FULL_NAME "irods_rule_engine_plugin-${IRODS_RULE_ENGINE_PLUGIN_NAME}")
set(PLUGIN irods_rule_engine_plugin-audit_amqp)

include(IrodsCXXCompiler)
Expand All @@ -46,10 +48,10 @@ include(IrodsExternals)

IRODS_MACRO_CHECK_DEPENDENCY_SET_FULLPATH_ADD_TO_IRODS_PACKAGE_DEPENDENCIES_LIST(QPID_PROTON qpid-proton0.36.0-3)

string(REPLACE ";" ", " ${PLUGIN}_PACKAGE_DEPENDENCIES_STRING "${IRODS_PACKAGE_DEPENDENCIES_LIST}")
string(REPLACE ";" ", " ${IRODS_PLUGIN_FULL_NAME}_PACKAGE_DEPENDENCIES_STRING "${IRODS_PACKAGE_DEPENDENCIES_LIST}")
unset(IRODS_PACKAGE_DEPENDENCIES_LIST)

project(irods_rule_engine_plugin-audit_amqp
project("${IRODS_PLUGIN_FULL_NAME}"
VERSION "${IRODS_PLUGIN_VERSION}"
LANGUAGES CXX)

Expand All @@ -62,58 +64,111 @@ endif()

include(GNUInstallDirs)
include(CheckCXXSymbolExists)
include(ObjectTargetHelpers)

find_package(Threads REQUIRED)
find_package(OpenSSL REQUIRED COMPONENTS Crypto SSL)
find_package(nlohmann_json "3.6.1" REQUIRED)
find_package(fmt "8.1.1" REQUIRED)

add_library(
${PLUGIN}
MODULE
set(
${IRODS_PLUGIN_FULL_NAME}_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/amqp_config.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/amqp_sender.cpp"
)
"${CMAKE_CURRENT_SOURCE_DIR}/src/audit_config.cpp"
)
set(
${PLUGIN}_HEADERS
${IRODS_PLUGIN_FULL_NAME}_HEADERS
"${CMAKE_CURRENT_SOURCE_DIR}/include/irods/private/amqp_config.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/include/irods/private/amqp_sender.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/include/irods/private/audit_amqp.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/include/irods/private/audit_config.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/include/irods/private/audit_b64enc.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/include/irods/private/amqp_sender.hpp"
)
target_sources(${PLUGIN} PRIVATE ${${PLUGIN}_HEADERS})
target_compile_options(${PLUGIN} PRIVATE -Wno-write-strings)
target_compile_definitions(${PLUGIN} PRIVATE ${IRODS_COMPILE_DEFINITIONS} ${IRODS_COMPILE_DEFINITIONS_PRIVATE} IRODS_ENABLE_SYSLOG)
"${CMAKE_CURRENT_SOURCE_DIR}/include/irods/private/proton_formatters.hpp"
)
set(
${IRODS_PLUGIN_FULL_NAME}_HEADERS_GENERATORS
"${CMAKE_CURRENT_SOURCE_DIR}/include/irods/private/audit_amqp_version.hpp.in"
)
set(
${IRODS_PLUGIN_FULL_NAME}_HEADERS_GENERATED
"${CMAKE_CURRENT_SOURCE_DIR}/include/irods/private/audit_amqp_version.hpp"
)

set_source_files_properties(
"${${IRODS_PLUGIN_FULL_NAME}_HEADERS_GENERATORS}"
PROPERTIES
HEADER_FILE_ONLY ON
)
set_source_files_properties(
"${${IRODS_PLUGIN_FULL_NAME}_HEADERS_GENERATED}"
PROPERTIES
GENERATED ON
)
Comment thread
korydraughn marked this conversation as resolved.

configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/include/irods/private/audit_amqp_version.hpp.in"
"${CMAKE_CURRENT_BINARY_DIR}/include/irods/private/audit_amqp_version.hpp"
@ONLY
)

add_library(
${IRODS_PLUGIN_FULL_NAME}_obj
OBJECT
"${${IRODS_PLUGIN_FULL_NAME}_SOURCES}"
"${${IRODS_PLUGIN_FULL_NAME}_HEADERS}"
"${${IRODS_PLUGIN_FULL_NAME}_HEADERS_GENERATORS}"
"${${IRODS_PLUGIN_FULL_NAME}_HEADERS_GENERATED}"
)
target_compile_options(${IRODS_PLUGIN_FULL_NAME}_obj PRIVATE -Wno-write-strings)
target_compile_definitions(${IRODS_PLUGIN_FULL_NAME}_obj PRIVATE ${IRODS_COMPILE_DEFINITIONS} ${IRODS_COMPILE_DEFINITIONS_PRIVATE} IRODS_ENABLE_SYSLOG)
target_include_directories(
${PLUGIN}
PRIVATE
${IRODS_PLUGIN_FULL_NAME}_obj
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
PRIVATE
${IRODS_INCLUDE_DIRS}
${IRODS_EXTERNALS_FULLPATH_BOOST}/include
${IRODS_EXTERNALS_FULLPATH_QPID_PROTON}/include
)

target_link_libraries(
${PLUGIN}
PRIVATE
${IRODS_PLUGIN_FULL_NAME}_obj
PUBLIC
irods_server
irods_common
nlohmann_json::nlohmann_json
fmt::fmt
PRIVATE
${IRODS_EXTERNALS_FULLPATH_QPID_PROTON}/lib/libqpid-proton-cpp.so
${IRODS_EXTERNALS_FULLPATH_BOOST}/lib/libboost_system.so
${IRODS_EXTERNALS_FULLPATH_BOOST}/lib/libboost_url.so
${CMAKE_DL_LIBS}
)

if (CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(${IRODS_PLUGIN_FULL_NAME}_obj PRIVATE IRODS_AUDIT_EXTRA_TRACE)
endif()

check_cxx_symbol_exists(__cpp_lib_filesystem "version" HAVE_STD_FILESYSTEM)
if (NOT HAVE_STD_FILESYSTEM)
target_link_libraries(
${PLUGIN}
${IRODS_PLUGIN_FULL_NAME}_obj
PRIVATE
${IRODS_EXTERNALS_FULLPATH_BOOST}/lib/libboost_filesystem.so
)
endif()

install(TARGETS ${PLUGIN} LIBRARY DESTINATION ${IRODS_PLUGINS_DIRECTORY}/rule_engines)
add_library(${IRODS_PLUGIN_FULL_NAME} MODULE)
target_link_objects(
${IRODS_PLUGIN_FULL_NAME}
PRIVATE
${IRODS_PLUGIN_FULL_NAME}_obj
)

install(TARGETS ${IRODS_PLUGIN_FULL_NAME} LIBRARY DESTINATION ${IRODS_PLUGINS_DIRECTORY}/rule_engines)

install(
FILES
Expand Down Expand Up @@ -163,10 +218,10 @@ set(CPACK_RPM_FILE_NAME RPM-DEFAULT)
set(CPACK_ARCHIVE_COMPONENT_INSTALL OFF)

set(CPACK_DEBIAN_PACKAGE_NAME ${PLUGIN_PACKAGE_NAME})
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${IRODS_PACKAGE_DEPENDENCIES_STRING}, ${${PLUGIN}_PACKAGE_DEPENDENCIES_STRING}, irods-runtime (= ${IRODS_VERSION})")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${IRODS_PACKAGE_DEPENDENCIES_STRING}, ${${IRODS_PLUGIN_FULL_NAME}_PACKAGE_DEPENDENCIES_STRING}, irods-runtime (= ${IRODS_VERSION})")

set(CPACK_RPM_PACKAGE_NAME ${PLUGIN_PACKAGE_NAME})
set(CPACK_RPM_PACKAGE_REQUIRES "${IRODS_PACKAGE_DEPENDENCIES_STRING}, ${${PLUGIN}_PACKAGE_DEPENDENCIES_STRING}, irods-runtime = ${IRODS_VERSION}")
set(CPACK_RPM_PACKAGE_REQUIRES "${IRODS_PACKAGE_DEPENDENCIES_STRING}, ${${IRODS_PLUGIN_FULL_NAME}_PACKAGE_DEPENDENCIES_STRING}, irods-runtime = ${IRODS_VERSION}")


if (NOT CPACK_GENERATOR)
Expand Down
Loading
Loading