question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] The deprecation message of `DeprecatedRoute` doesn't show in the API response

See original GitHub issue

Describe the bug The deprecation message of DeprecatedRoute doesn’t show in the API response

To Reproduce Steps to reproduce the behavior:

  1. Checkout the branch
  2. Check the DeprecatedRoute. Wait for a couple of seconds to allow the page to be redirected to the highlighted lines. This is the same approach using DeprecatedRoute as here.
  3. Build security plugin: ./gradlew clean build -Dbuild.snapshot=false -x test
  4. Get the security plugin zip file from build/distribution folder.
  5. Install security plugin on OpenSearch 2.0
  6. Log into OpenSearch node and go to the folder opensearch/config
  7. Send the whitelist API request with super admin certs.
curl -k -i --cert kirk.pem --key kirk-key.pem https://localhost:9200/_plugins/_security/api/whitelist\?pretty -u admin:admin --insecure

Expected response The deprecation message("[/whitelist] is a deprecated endpoint. Please use [/allowlist] instead.") should show in the response

Actual response The deprecation message doesn’t show in the response or the logs.

HTTP/1.1 200 OK
content-type: application/json; charset=UTF-8
content-length: 171

{
  "config" : {
    "enabled" : false,
    "requests" : {
      "/_cluster/settings" : [
        "GET"
      ],
      "/_cat/nodes" : [
        "GET"
      ]
    }
  }
}

Plugins Security plugin

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
retacommented, May 13, 2022

@cliu123 you should be able to get Warning header by by adding

appender.header_warning.type = HeaderWarningAppender
appender.header_warning.name = header_warning                                                

to config/log4j2.properties.

1reaction
cliu123commented, May 17, 2022

The expected behavior has been clarified! Thanks @tlfeng @reta! Closing the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Convention for HTTP response header to notify clients of ...
The problem with 410 is that it does not match the "to-be-deprecated" requirement... It works fine when the API is gone, but not...
Read more >
Deprecating API Endpoints - Stoplight Blog
Deprecation communicates a function, method, or entire package is going away or being. How do you warn developers when an API or endpoint...
Read more >
Important changes (deprecations) coming in Power Apps and ...
"Deprecated" means we intend to remove the feature or capability from a future release. The feature or capability will continue to work and...
Read more >
Deprecations · Cloudflare Workers docs
This field is not mandatory, and defaults to true when route or routes are not configured. When routes are present, it defaults to...
Read more >
Deprecations by version - GitLab Docs
x.x will display a deprecation warning in the pipeline's Security tab. ... in the deprecated versions because we do not backport bugs and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found