• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

WebLogic Server Domain: How To Disable the HTTP methods other than GET and POST (such as PUT, DELETE, etc.)

by admin

The objective is to disable the HTTP methods other than GET and POST (such as PUT, DELETE etc.) in a WebLogic Server domain.

We can restrict the access to HTTP methods such as PUT or DELETE using security constraints in the <application_name>/WEB-INF/web.xml:

<security-constraint>
  <display-name>Constraint-0</display-name>
  <web-resource-collection>
    <web-resource-name>mytest</web-resource-name>
    <description>Test</description>
    <url-pattern>/*</url-pattern>
    <http-method>PUT</http-method>
    <http-method>DELETE</http-method>
  </web-resource-collection>
  <auth-constraint>
    <role-name>NONE</role-name>
  </auth-constraint>
  <user-data-constraint>
    <transport-guarantee>NONE</transport-guarantee>
  </user-data-constraint>
</security-constraint>

Note: There is no option in WebLogic Server to disable them across the entire server because the specifications require that the application server allows all the HTTP methods.

The onus is on the application to actually restrict the HTTP methods. The way we do this is by providing the security constraints in the web.xml file.

A possible workaround for imposing these restrictions across multiple applications is to route all initial traffic through a WLS virtual host with a web application at the default context path that then proxies to the other web applications on the same server, which may not necessarily be all on the same virtual host. Note that this approach would not be very efficient as it would require multiple threads per request.

You may also use Oracle HTTP Server (or Apache) as a proxy where internet users are only able to access through the proxy.

Filed Under: Apache, oracle, WebLogic

Some more articles you might also be interested in …

  1. Log file locations for Enterprise Manager Cloud Control 13c (OMS)
  2. How does the RMAN Retention Policy Obsolete Incremental Backupsets
  3. How to trace asmcmd command on UNIX/Linux
  4. What Is Oracle Key Vault
  5. How to recreate an ASM disk group
  6. Oracle Database 18c: Roll Forward Physical Standby Using RMAN Incremental Backup in Single Command
  7. How to find the Character set of Oracle Database
  8. How an SQL query is executed in Oracle Database
  9. Configuring Data Guard in Oracle Cloud Infrastructure (OCI)
  10. Oracle Database 18c new feature – Scalable Sequences

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright