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

Add StampEventIKeyForConcerns option in Java layer #1107

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ private static native boolean nativeInitializePrivacyGuard(
boolean UseEventFieldPrefix,
boolean ScanForUrls,
boolean DisableAdvancedScans,
boolean StampEventIKeyForConcerns,
String domainName,
String machineName,
Object[] userNames,
Expand All @@ -31,7 +32,8 @@ private static native boolean nativeInitializePrivacyGuardWithoutCommonDataConte
String SummaryEventName,
boolean UseEventFieldPrefix,
boolean ScanForUrls,
boolean DisableAdvancedScans
boolean DisableAdvancedScans,
boolean StampEventIKeyForConcerns
);

/**
Expand Down Expand Up @@ -61,6 +63,7 @@ public static boolean initialize(PrivacyGuardInitConfig initConfig)
initConfig.UseEventFieldPrefix,
initConfig.ScanForUrls,
initConfig.DisableAdvancedScans,
initConfig.StampEventIKeyForConcerns,
initConfig.DataContext.domainName,
initConfig.DataContext.machineName,
initConfig.DataContext.userNames.toArray(),
Expand All @@ -78,7 +81,8 @@ public static boolean initialize(PrivacyGuardInitConfig initConfig)
initConfig.SummaryEventName,
initConfig.UseEventFieldPrefix,
initConfig.ScanForUrls,
initConfig.DisableAdvancedScans
initConfig.DisableAdvancedScans,
initConfig.StampEventIKeyForConcerns
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,10 @@ public PrivacyGuardInitConfig(ILogger logger, CommonDataContext context)
* Default value is `false`.
*/
public boolean DisableAdvancedScans = false;

/**
* (OPTIONAL) Should stamp the iKey for the scanned event as an additional property on Concerns.
* Default value is `false`.
*/
public boolean StampEventIKeyForConcerns = false;
}
6 changes: 3 additions & 3 deletions lib/include/public/Version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#define MAT_VERSION_HPP
// WARNING: DO NOT MODIFY THIS FILE!
// This file has been automatically generated, manual changes will be lost.
#define BUILD_VERSION_STR "3.7.46.1"
#define BUILD_VERSION 3,7,46,1
#define BUILD_VERSION_STR "3.7.62.1"
#define BUILD_VERSION 3,7,62,1

#ifndef RESOURCE_COMPILER_INVOKED
#include "ctmacros.hpp"
Expand All @@ -18,7 +18,7 @@ namespace MAT_NS_BEGIN {
uint64_t const Version =
((uint64_t)3 << 48) |
((uint64_t)7 << 32) |
((uint64_t)46 << 16) |
((uint64_t)62 << 16) |
Copy link
Contributor

Choose a reason for hiding this comment

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

nit - do you plan to do new release with this version, or else you want me to do a release?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I can do a release.

((uint64_t)1);

} MAT_NS_END
Expand Down
6 changes: 5 additions & 1 deletion lib/jni/PrivacyGuard_jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ Java_com_microsoft_applications_events_PrivacyGuard_nativeInitializePrivacyGuard
jstring SummaryEventName,
jboolean UseEventFieldPrefix,
jboolean ScanForUrls,
jboolean DisableAdvancedScans) {
jboolean DisableAdvancedScans,
jboolean StampEventIKeyForConcerns) {
if (spPrivacyGuard != nullptr) {
return false;
}
Expand All @@ -76,6 +77,7 @@ Java_com_microsoft_applications_events_PrivacyGuard_nativeInitializePrivacyGuard
config.UseEventFieldPrefix = static_cast<bool>(UseEventFieldPrefix);
config.ScanForUrls = static_cast<bool>(ScanForUrls);
config.DisableAdvancedScans = static_cast<bool>(DisableAdvancedScans);
config.StampEventIKeyForConcerns = static_cast<bool>(StampEventIKeyForConcerns);

spPrivacyGuard = std::make_shared<PrivacyGuard>(config);
return true;
Expand All @@ -92,6 +94,7 @@ Java_com_microsoft_applications_events_PrivacyGuard_nativeInitializePrivacyGuard
jboolean UseEventFieldPrefix,
jboolean ScanForUrls,
jboolean DisableAdvancedScans,
jboolean StampEventIKeyForConcerns,
jstring domainName,
jstring machineName,
jobjectArray userNames,
Expand Down Expand Up @@ -131,6 +134,7 @@ Java_com_microsoft_applications_events_PrivacyGuard_nativeInitializePrivacyGuard
config.UseEventFieldPrefix = static_cast<bool>(UseEventFieldPrefix);
config.ScanForUrls = static_cast<bool>(ScanForUrls);
config.DisableAdvancedScans = static_cast<bool>(DisableAdvancedScans);
config.StampEventIKeyForConcerns = static_cast<bool>(StampEventIKeyForConcerns);

spPrivacyGuard = std::make_shared<PrivacyGuard>(config);
return true;
Expand Down
2 changes: 1 addition & 1 deletion lib/modules