Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ private static List<Scope> createServerEntitlements(Path pidFile) {
new CreateClassLoaderEntitlement(),
new FilesEntitlement(
List.of(
// TODO: what in es.base is accessing shared repo?
// necessary due to lack of delegation ES-12382
FilesEntitlement.FileData.ofBaseDirPath(SHARED_REPO, READ_WRITE),
FilesEntitlement.FileData.ofBaseDirPath(SHARED_DATA, READ_WRITE),
FilesEntitlement.FileData.ofBaseDirPath(DATA, READ_WRITE)
)
)
Expand Down Expand Up @@ -122,6 +123,7 @@ private static List<Scope> createServerEntitlements(Path pidFile) {
new FilesEntitlement(
List.of(
FilesEntitlement.FileData.ofBaseDirPath(CONFIG, READ),
FilesEntitlement.FileData.ofBaseDirPath(SHARED_DATA, READ_WRITE),
FilesEntitlement.FileData.ofBaseDirPath(DATA, READ_WRITE)
)
)
Expand All @@ -130,7 +132,12 @@ private static List<Scope> createServerEntitlements(Path pidFile) {
new Scope(
"org.apache.lucene.misc",
List.of(
new FilesEntitlement(List.of(FilesEntitlement.FileData.ofBaseDirPath(DATA, READ_WRITE))),
new FilesEntitlement(
List.of(
FilesEntitlement.FileData.ofBaseDirPath(SHARED_DATA, READ_WRITE),
FilesEntitlement.FileData.ofBaseDirPath(DATA, READ_WRITE)
)
),
new ReadStoreAttributesEntitlement()
)
),
Expand All @@ -145,7 +152,12 @@ private static List<Scope> createServerEntitlements(Path pidFile) {
"org.elasticsearch.nativeaccess",
List.of(
new LoadNativeLibrariesEntitlement(),
new FilesEntitlement(List.of(FilesEntitlement.FileData.ofBaseDirPath(DATA, READ_WRITE)))
new FilesEntitlement(
List.of(
FilesEntitlement.FileData.ofBaseDirPath(SHARED_DATA, READ_WRITE),
FilesEntitlement.FileData.ofBaseDirPath(DATA, READ_WRITE)
)
)
)
)
);
Expand Down