From 451e4d651472e17784a57fdf52d52c0168ea2efa Mon Sep 17 00:00:00 2001 From: Stephen Crawford Date: Mon, 16 Oct 2023 12:48:47 -0400 Subject: [PATCH] spotless Signed-off-by: Stephen Crawford --- .../identity/shiro/ShiroTokenManager.java | 2 - .../test/ingest/20_combine_processors.yml | 189 ------------------ 2 files changed, 191 deletions(-) delete mode 100644 qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/20_combine_processors.yml diff --git a/plugins/identity-shiro/src/main/java/org/opensearch/identity/shiro/ShiroTokenManager.java b/plugins/identity-shiro/src/main/java/org/opensearch/identity/shiro/ShiroTokenManager.java index 7947b95ca55f1..a14215aa7655b 100644 --- a/plugins/identity-shiro/src/main/java/org/opensearch/identity/shiro/ShiroTokenManager.java +++ b/plugins/identity-shiro/src/main/java/org/opensearch/identity/shiro/ShiroTokenManager.java @@ -10,13 +10,11 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.AuthenticationToken; import org.apache.shiro.authc.UsernamePasswordToken; import org.opensearch.common.Randomness; import org.opensearch.identity.IdentityService; import org.opensearch.identity.Subject; -import org.opensearch.identity.noop.NoopSubject; import org.opensearch.identity.tokens.AuthToken; import org.opensearch.identity.tokens.BasicAuthToken; import org.opensearch.identity.tokens.OnBehalfOfClaims; diff --git a/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/20_combine_processors.yml b/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/20_combine_processors.yml deleted file mode 100644 index 27f7f804ead1c..0000000000000 --- a/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/20_combine_processors.yml +++ /dev/null @@ -1,189 +0,0 @@ ---- -"Test with date processor": - - do: - ingest.put_pipeline: - id: "_id" - body: > - { - "processors": [ - { - "grok" : { - "field" : "log", - "patterns": ["%{COMBINEDAPACHELOG}"] - } - }, - { - "convert" : { - "field" : "response", - "type": "integer" - } - }, - { - "convert" : { - "field" : "bytes", - "type": "integer" - } - }, - { - "date" : { - "field" : "timestamp", - "target_field" : "timestamp", - "formats" : ["dd/MMM/yyyy:HH:mm:ss xx"] - } - }, - { - "geoip" : { - "field" : "clientip" - } - } - ] - } - - match: { acknowledged: true } - - - do: - index: - index: test - id: 1 - pipeline: "_id" - body: { - log: "70.193.17.92 - - [08/Sep/2014:02:54:42 +0000] \"GET /presentations/logstash-scale11x/images/ahhh___rage_face_by_samusmmx-d5g5zap.png HTTP/1.1\" 200 175208 \"http://mobile.rivals.com/board_posts.asp?SID=880&mid=198829575&fid=2208&tid=198829575&Team=&TeamId=&SiteId=\" \"Mozilla/5.0 (Linux; Android 4.2.2; VS980 4G Build/JDQ39B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.135 Mobile Safari/537.36\"" - } - - - do: - get: - index: test - id: 1 - - length: { _source: 13 } - - match: { _source.request: "/presentations/logstash-scale11x/images/ahhh___rage_face_by_samusmmx-d5g5zap.png" } - - match: { _source.agent: "\"Mozilla/5.0 (Linux; Android 4.2.2; VS980 4G Build/JDQ39B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.135 Mobile Safari/537.36\"" } - - match: { _source.auth: "-" } - - match: { _source.verb: "GET" } - - match: { _source.referrer: "\"http://mobile.rivals.com/board_posts.asp?SID=880&mid=198829575&fid=2208&tid=198829575&Team=&TeamId=&SiteId=\"" } - - match: { _source.response: 200 } - - match: { _source.bytes: 175208 } - - match: { _source.clientip: "70.193.17.92" } - - match: { _source.httpversion: "1.1" } - - match: { _source.timestamp: "2014-09-08T02:54:42.000Z" } - - match: { _source.geoip.continent_name: "North America" } - - match: { _source.geoip.country_iso_code: "US" } - ---- -"Test mutate": - - do: - ingest.put_pipeline: - id: "_id" - body: > - { - "processors": [ - { - "foreach" : { - "field" : "friends", - "processor" : { - "remove" : { - "field" : "_ingest._value.id" - } - } - } - }, - { - "append" : { - "field" : "tags", - "value": "new_value" - } - }, - { - "split" : { - "field" : "address", - "separator": "," - } - }, - { - "foreach" : { - "field" : "address", - "processor" : { - "trim" : { - "field" : "_ingest._value" - } - } - } - }, - { - "lowercase" : { - "field" : "company" - } - }, - { - "uppercase" : { - "field" : "gender" - } - }, - { - "rename" : { - "field" : "eyeColor", - "target_field" : "eye_color" - } - } - ] - } - - match: { acknowledged: true } - - - do: - index: - index: test - id: 1 - pipeline: "_id" - body: { - "age" : 33, - "eyeColor" : "brown", - "name" : "Miranda Goodwin", - "gender" : "male", - "company": "ATGEN", - "email" : "mirandagoodwin@atgen.com", - "phone": "+1 (914) 489-3656", - "address" : "713 Bartlett Place, Accoville, Puerto Rico, 9221", - "registered": "2014-11-23T08:34:21 -01:00", - "tags" : [ - "ex", - "do", - "occaecat", - "reprehenderit", - "anim", - "laboris", - "cillum" - ], - "friends": [ - { - "id" : 0, - "name" : "Wendi Odonnell" - }, - { - "id" : 1, - "name" : "Mayra Boyd" - }, - { - "id": 2, - "name": "Lee Gonzalez" - } - ] - } - - - do: - get: - index: test - id: 1 - - length: { _source: 11 } - - is_false: _source.friends.0.id - - is_false: _source.friends.1.id - - is_false: _source.friends.2.id - - match: { _source.friends.0.name: "Wendi Odonnell" } - - match: { _source.friends.1.name: "Mayra Boyd" } - - match: { _source.friends.2.name: "Lee Gonzalez" } - - match: { _source.tags.7: "new_value" } - - length: { _source.address: 4 } - - match: { _source.address.0: "713 Bartlett Place" } - - match: { _source.address.1: "Accoville" } - - match: { _source.address.2: "Puerto Rico" } - - match: { _source.address.3: "9221" } - - match: { _source.company: "atgen" } - - match: { _source.gender: "MALE" } - - match: { _source.eye_color: "brown" }