forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ccs-telemetry-remotes
- Loading branch information
Showing
122 changed files
with
2,878 additions
and
735 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
### Entitlement Agent | ||
|
||
This is a java agent that instruments sensitive class library methods with calls into the `entitlement-runtime` module to check for permissions granted under the _entitlements_ system. | ||
|
||
The entitlements system provides an alternative to the legacy `SecurityManager` system, which is deprecated for removal. | ||
With this agent, the Elasticsearch server can retain some control over which class library methods can be invoked by which callers. | ||
|
||
This module is responsible for inserting the appropriate bytecode to achieve enforcement of the rules governed by the `entitlement-runtime` module. | ||
|
||
It is not responsible for permission granting or checking logic. That responsibility lies with `entitlement-runtime`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
apply plugin: 'elasticsearch.build' | ||
|
||
configurations { | ||
entitlementRuntime | ||
} | ||
|
||
dependencies { | ||
entitlementRuntime project(":libs:elasticsearch-entitlement-runtime") | ||
implementation project(":libs:elasticsearch-entitlement-runtime") | ||
testImplementation project(":test:framework") | ||
} | ||
|
||
tasks.named('test').configure { | ||
dependsOn('jar') | ||
jvmArgs "-javaagent:${ tasks.named('jar').flatMap{ it.archiveFile }.get()}" | ||
} | ||
|
||
tasks.named('jar').configure { | ||
manifest { | ||
attributes( | ||
'Premain-Class': 'org.elasticsearch.entitlement.agent.EntitlementAgent' | ||
, 'Can-Retransform-Classes': 'true' | ||
) | ||
} | ||
} | ||
|
||
tasks.named('forbiddenApisMain').configure { | ||
replaceSignatureFiles 'jdk-signatures' | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...lement-agent/src/test/java/org/elasticsearch/entitlement/agent/EntitlementAgentTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
package org.elasticsearch.entitlement.agent; | ||
|
||
import org.elasticsearch.entitlement.runtime.api.EntitlementChecks; | ||
import org.elasticsearch.test.ESTestCase; | ||
import org.elasticsearch.test.ESTestCase.WithoutSecurityManager; | ||
|
||
/** | ||
* This is an end-to-end test that runs with the javaagent installed. | ||
* It should exhaustively test every instrumented method to make sure it passes with the entitlement | ||
* and fails without it. | ||
* See {@code build.gradle} for how we set the command line arguments for this test. | ||
*/ | ||
@WithoutSecurityManager | ||
public class EntitlementAgentTests extends ESTestCase { | ||
|
||
public void testAgentBooted() { | ||
assertTrue(EntitlementChecks.isAgentBooted()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 112768 | ||
summary: Deduplicate Kuromoji User Dictionary | ||
area: Search | ||
type: enhancement | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 113102 | ||
summary: Trigger merges after recovery | ||
area: Recovery | ||
type: enhancement | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 113103 | ||
summary: "ESQL: Align year diffing to the rest of the units in DATE_DIFF: chronological" | ||
area: ES|QL | ||
type: bug | ||
issues: | ||
- 112482 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 113123 | ||
summary: "ES|QL: Skip CASE function from `InferIsNotNull` rule checks" | ||
area: ES|QL | ||
type: bug | ||
issues: | ||
- 112704 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
3 changes: 2 additions & 1 deletion
3
docs/reference/esql/functions/kibana/definition/date_diff.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
### Entitlement runtime | ||
|
||
This module implements mechanisms to grant and check permissions under the _entitlements_ system. | ||
|
||
The entitlements system provides an alternative to the legacy `SecurityManager` system, which is deprecated for removal. | ||
The `entitlement-agent` tool instruments sensitive class library methods with calls to this module, in order to enforce the controls. | ||
|
||
This module is responsible for: | ||
- Defining which class library methods are sensitive | ||
- Defining what permissions should be checked for each sensitive method | ||
- Implementing the permission checks | ||
- Offering a "grant" API to grant permissions | ||
|
||
It is not responsible for anything to do with bytecode instrumentation; that responsibility lies with `entitlement-agent`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.