<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Chris Hoina on Medium]]></title>
        <description><![CDATA[Stories by Chris Hoina on Medium]]></description>
        <link>https://medium.com/@chrishoina?source=rss-887d963500db------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*LfEOUkf1eTqXk1m-osAvkg.jpeg</url>
            <title>Stories by Chris Hoina on Medium</title>
            <link>https://medium.com/@chrishoina?source=rss-887d963500db------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 25 Nov 2026 00:16:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chrishoina/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ORDS and GraphQL: using Maven to build the polyglot and js dependencies for GraalVM for JDK 21]]></title>
            <link>https://chrishoina.medium.com/ords-and-graphql-using-maven-to-build-the-polyglot-and-js-dependencies-for-graalvm-for-jdk-21-b7bd25188d5e?source=rss-887d963500db------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7bd25188d5e</guid>
            <category><![CDATA[oracle-rest-data-services]]></category>
            <category><![CDATA[ord]]></category>
            <category><![CDATA[oracle-database]]></category>
            <category><![CDATA[graalvm]]></category>
            <category><![CDATA[maven]]></category>
            <dc:creator><![CDATA[Chris Hoina]]></dc:creator>
            <pubDate>Thu, 03 Jul 2025 23:30:45 GMT</pubDate>
            <atom:updated>2025-07-03T23:30:45.808Z</atom:updated>
            <content:encoded><![CDATA[<h3>Disclaimer</h3><p>This article is an expansion from a previous, separate <a href="https://forums.oracle.com/ords/apexds/post/is-oracle-graalvm-enterprise-edition-21-free-for-running-st-2528">Oracle forums thread</a>. The question posed was (paraphrasing):</p><blockquote><em>Can I use ORDS with Oracle GraalVM for JDK 21 (despite the ORDS team only </em>officially<em> claiming support for Oracle JDK 17, Oracle JDK 21, Oracle GraalVM Enterprise Edition for Java version 17, and Oracle GraalVM Enterprise Edition for Java version 21)?</em></blockquote><blockquote>And<em>, if I can, how do I install the Oracle GraalVM for JDK 21 graaljs and polyglot dependencies required for ORDS’ GraphQL UI and querying capabilities?</em></blockquote><p>I’m also reiterating, that what follows is <strong><em>experimental only</em></strong>. We still need to investigate the possibility of supporting Oracle GraalVM for JDK 17 or 21 (the non-Enterprise Editions) in future ORDS releases. So, stay tuned. With all the disclaimers and release of liability out of the way, read on if you’d like learn how to build these dependencies for Oracle GraalVM for JDK 21.</p><p>You’ll need Maven first though.</p><h4>Install Maven</h4><p>Install the Java project build tool Maven. Installation instructions for your OS can be found <a href="https://maven.apache.org/install.html">here</a>.</p><h4>Create a new Maven project</h4><p>Next, create a new Maven project (you can use the maven-archetype-quickstart archetype for your project) by executing this command in your terminal:</p><pre>mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.5 -DinteractiveMode=false</pre><p><strong>Learn:</strong> Refer to the quick <a href="https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html">Maven start guide</a> if you run into trouble. And read up on the structure of the quickstart archetype <a href="https://maven.apache.org/archetypes/maven-archetype-quickstart/">here</a>.</p><p>Next cd into the project folder (e.g., the artifactId, in this case “my-app”):</p><pre>cd my-app</pre><p>Your project folder will resemble the following:</p><pre>.<br>├── pom.xml<br>└── src<br>    ├── main<br>    │   └── java<br>    │       └── com<br>    │           └── mycompany<br>    │               └── app<br>    │                   └── App.java<br>    └── test<br>        └── java<br>            └── com<br>                └── mycompany<br>                    └── app<br>                        └── AppTest.java</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PWFpL5f_jeeMLAKD.jpeg" /></figure><p>You can disregard /src/test subfolder and its descendants.</p><h4>Modify the pom.xml file</h4><p>You will need to modify the quickstart project’s pom.xml file. Add the following dependencies in the &lt;dependencies&gt;&lt;/dependencies&gt; parameter section:</p><pre>&lt;dependency&gt;<br>    &lt;groupId&gt;org.graalvm.polyglot&lt;/groupId&gt;<br>    &lt;artifactId&gt;polyglot&lt;/artifactId&gt;<br>    &lt;version&gt;[TBD]&lt;/version&gt;<br>&lt;/dependency&gt;<br>&lt;dependency&gt;<br>    &lt;groupId&gt;org.graalvm.polyglot&lt;/groupId&gt;<br>    &lt;artifactId&gt;js&lt;/artifactId&gt;<br>    &lt;version&gt;[TBD]&lt;/version&gt;<br>    &lt;type&gt;pom&lt;/type&gt;<br>&lt;/dependency&gt;</pre><p><strong>From the docs:</strong> Dependency examples are taken from <a href="https://www.graalvm.org/javascript/#getting-started">here</a>.</p><h4>How do I know which version to choose?</h4><p>Check the Release Notes for the JDK you intend to use. In this case, I’m configuring Oracle GraalVM for JDK 21.0.7, which is based on Oracle JDK 21. The Release Notes state:</p><blockquote><em>Truffle languages and other components version 23.1.7 are designed for use with GraalVM for JDK 21.0.7.” So, I’m using the following </em><a href="https://central.sonatype.com/artifact/org.graalvm.polyglot/polyglot/23.1.7/overview"><em>polyglot</em></a><em> and </em><a href="https://central.sonatype.com/artifact/org.graalvm.polyglot/js/23.1.7"><em>js</em></a><em> versions.</em></blockquote><h4>Updated pom.xml file</h4><p>Your updated POM.xml file should end up looking like this:</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;<br>  xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;<br>  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;<br><br>  &lt;groupId&gt;com.mycompany.app&lt;/groupId&gt;<br>  &lt;artifactId&gt;my-app&lt;/artifactId&gt;<br>  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;<br><br>  &lt;name&gt;my-app&lt;/name&gt;<br>  &lt;!-- FIXME change it to the project&#39;s website --&gt;<br>  &lt;url&gt;http://www.example.com&lt;/url&gt;<br><br>  &lt;properties&gt;<br>    &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;<br>    &lt;maven.compiler.release&gt;17&lt;/maven.compiler.release&gt;<br>  &lt;/properties&gt;<br><br>  &lt;dependencyManagement&gt;<br>    &lt;dependencies&gt;<br>      &lt;dependency&gt;<br>        &lt;groupId&gt;org.junit&lt;/groupId&gt;<br>        &lt;artifactId&gt;junit-bom&lt;/artifactId&gt;<br>        &lt;version&gt;5.11.0&lt;/version&gt;<br>        &lt;type&gt;pom&lt;/type&gt;<br>        &lt;scope&gt;import&lt;/scope&gt;<br>      &lt;/dependency&gt;<br>    &lt;/dependencies&gt;<br>  &lt;/dependencyManagement&gt;<br><br>  &lt;dependencies&gt;<br>    &lt;dependency&gt;<br>      &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;<br>      &lt;artifactId&gt;junit-jupiter-api&lt;/artifactId&gt;<br>      &lt;scope&gt;test&lt;/scope&gt;<br>    &lt;/dependency&gt;<br>    &lt;!-- Optionally: parameterized tests support --&gt;<br>    &lt;dependency&gt;<br>      &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;<br>      &lt;artifactId&gt;junit-jupiter-params&lt;/artifactId&gt;<br>      &lt;scope&gt;test&lt;/scope&gt;<br>    &lt;/dependency&gt;<br>    &lt;dependency&gt;<br>      &lt;groupId&gt;org.graalvm.polyglot&lt;/groupId&gt;<br>      &lt;artifactId&gt;polyglot&lt;/artifactId&gt;<br>      &lt;version&gt;23.1.7&lt;/version&gt;<br>    &lt;/dependency&gt;<br>    &lt;dependency&gt;<br>      &lt;groupId&gt;org.graalvm.polyglot&lt;/groupId&gt;<br>      &lt;artifactId&gt;js&lt;/artifactId&gt;<br>      &lt;version&gt;23.1.7&lt;/version&gt;<br>      &lt;type&gt;pom&lt;/type&gt;<br>    &lt;/dependency&gt;<br>  &lt;/dependencies&gt;<br><br>  &lt;build&gt;<br>    &lt;pluginManagement&gt;&lt;!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) --&gt;<br>      &lt;plugins&gt;<br>        &lt;!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle --&gt;<br>        &lt;plugin&gt;<br>          &lt;artifactId&gt;maven-clean-plugin&lt;/artifactId&gt;<br>          &lt;version&gt;3.4.0&lt;/version&gt;<br>        &lt;/plugin&gt;<br>        &lt;!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging --&gt;<br>        &lt;plugin&gt;<br>          &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;<br>          &lt;version&gt;3.3.1&lt;/version&gt;<br>        &lt;/plugin&gt;<br>        &lt;plugin&gt;<br>          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;<br>          &lt;version&gt;3.13.0&lt;/version&gt;<br>        &lt;/plugin&gt;<br>        &lt;plugin&gt;<br>          &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;<br>          &lt;version&gt;3.3.0&lt;/version&gt;<br>        &lt;/plugin&gt;<br>        &lt;plugin&gt;<br>          &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;<br>          &lt;version&gt;3.4.2&lt;/version&gt;<br>        &lt;/plugin&gt;<br>        &lt;plugin&gt;<br>          &lt;artifactId&gt;maven-install-plugin&lt;/artifactId&gt;<br>          &lt;version&gt;3.1.2&lt;/version&gt;<br>        &lt;/plugin&gt;<br>        &lt;plugin&gt;<br>          &lt;artifactId&gt;maven-deploy-plugin&lt;/artifactId&gt;<br>          &lt;version&gt;3.1.2&lt;/version&gt;<br>        &lt;/plugin&gt;<br>        &lt;!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle --&gt;<br>        &lt;plugin&gt;<br>          &lt;artifactId&gt;maven-site-plugin&lt;/artifactId&gt;<br>          &lt;version&gt;3.12.1&lt;/version&gt;<br>        &lt;/plugin&gt;<br>        &lt;plugin&gt;<br>          &lt;artifactId&gt;maven-project-info-reports-plugin&lt;/artifactId&gt;<br>          &lt;version&gt;3.6.1&lt;/version&gt;<br>        &lt;/plugin&gt;<br>      &lt;/plugins&gt;<br>    &lt;/pluginManagement&gt;<br>  &lt;/build&gt;<br>&lt;/project&gt;</pre><h3>Copy the Maven dependencies</h3><p>Save your changes, and then from your terminal execute the following command:</p><pre>mvn dependency:copy-dependencies</pre><p>You’ll notice a new /target/dependency subfolder in your project, along with new .jar and .pom files:</p><pre>.<br>├── pom.xml<br>├── src<br>│   ├── main<br>│   │   └── java<br>│   │       └── com<br>│   │           └── mycompany<br>│   │               └── app<br>│   │                   └── App.java<br>│   └── test<br>│       └── java<br>│           └── com<br>│               └── mycompany<br>│                   └── app<br>│                       └── AppTest.java<br>└── target<br>    ├── classes<br>    │   └── com<br>    │       └── mycompany<br>    │           └── app<br>    │               └── App.class<br>    ├── dependency<br>    │   ├── apiguardian-api-1.1.2.jar<br>    │   ├── collections-23.1.7.jar<br>    │   ├── icu4j-23.1.7.jar<br>    │   ├── jniutils-23.1.7.jar<br>    │   ├── js-23.1.7.pom<br>    │   ├── js-community-23.1.7.pom<br>    │   ├── js-language-23.1.7.jar<br>    │   ├── junit-jupiter-api-5.11.0.jar<br>    │   ├── junit-jupiter-params-5.11.0.jar<br>    │   ├── junit-platform-commons-1.11.0.jar<br>    │   ├── nativebridge-23.1.7.jar<br>    │   ├── nativeimage-23.1.7.jar<br>    │   ├── opentest4j-1.3.0.jar<br>    │   ├── polyglot-23.1.7.jar<br>    │   ├── regex-23.1.7.jar<br>    │   ├── truffle-api-23.1.7.jar<br>    │   ├── truffle-compiler-23.1.7.jar<br>    │   ├── truffle-enterprise-23.1.7.jar<br>    │   ├── truffle-runtime-23.1.7.jar<br>    │   └── word-23.1.7.jar<br>    └── test-classes<br>        └── com<br>            └── mycompany<br>                └── app<br>                    └── AppTest.class</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*efBhUgAOogtrhTbp.jpeg" /></figure><h4>Relocate the new .pom and .jar files</h4><p>You’ll need to move all of the files from this temporary app project, and place them into your [ORDS product folder]/lib/ext folder. If you recall, when you first configure and install ORDS, the best practice is to set the ORDS/bin and ORDS_CONFIG environment variables.</p><p><strong>Note:</strong> ORDS/bin is a reference to one of the subfolders in your (parent) “ORDS Product folder.”</p><p>If I issue the ENV command in a terminal, I’ll see something similar to the following:</p><pre>TMPDIR=/var/folders/wm/t9qmbgnn3f577b51xzb5yrkc0000gp/T/<br>__CFBundleIdentifier=com.apple.Terminal<br>XPC_FLAGS=0x0<br>TERM=xterm-256color<br>SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.sFYLlexTu3/Listeners<br>XPC_SERVICE_NAME=0<br>TERM_PROGRAM=Apple_Terminal<br>TERM_PROGRAM_VERSION=455.1<br>TERM_SESSION_ID=*********-****-****-****-**********<br>SHELL=/bin/zsh<br>HOME=/Users/choina<br>LOGNAME=choina<br>USER=choina<br>PATH=/opt/homebrew/Caskroom/sqlcl/25.1.1.113.2054/sqlcl/bin:/Library/Frameworks/Python.framework/Versions/3.13/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/podman/bin:/Users/choina/ords/25.2.0.r1651520/bin<br>SHLVL=1<br>PWD=/Users/choina/my-app<br>OLDPWD=/Users/choina<br>HOMEBREW_PREFIX=/opt/homebrew<br>HOMEBREW_CELLAR=/opt/homebrew/Cellar<br>HOMEBREW_REPOSITORY=/opt/homebrew<br>INFOPATH=/opt/homebrew/share/info:<br>ORDS_CONFIG=/Users/choina/ords/ords_config<br>LANG=en_US.UTF-8<br>_=/usr/bin/env<br>```</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Tl-9PGZw4t1e9FWp.jpeg" /></figure><p>Notice in the PATH variable the location of my “ORDS Product Folder”: /Users/choina/ords/25.2.0.r1651520/bin. You can use that “root” /Users/choina/ords/25.2.0.r1651520/ and cd directly to the /lib/ext folder. Like this:</p><pre>cd /Users/choina/ords/25.2.0.r1651520/lib/ext</pre><p>Drag and drop (or use the mv command) all of these new .jar and .pom files from the /target/dependency folder into the ORDS /lib/ext folder. Your ORDS product folder will now look something like this:</p><pre>.<br>├── bin<br>│   ├── ords<br>│   ├── ords-metrics<br>│   └── ords.exe<br>├── docs<br>│   └── javadoc<br>│       └── plugin-api<br>├── examples<br>│   ├── application-container<br>│   │   └── README.md<br>│   ├── db_auth<br>│   │   ├── index.html<br>│   │   └── sql<br>│   ├── ords-metrics<br>│   │   ├── create_alarms.sh<br>│   │   └── ords-metrics.service<br>│   ├── plugins<br>│   │   ├── lib<br>│   │   ├── plugin-demo<br>│   │   └── plugin-javascript<br>│   ├── pre_hook<br>│   │   ├── index.html<br>│   │   ├── README.md<br>│   │   └── sql<br>│   └── soda<br>│       └── getting-started<br>├── icons<br>│   └── ords_logo2.ico<br>├── lib<br>│   └── ext<br>│       ├── apiguardian-api-1.1.2.jar<br>│       ├── collections-23.1.7.jar<br>│       ├── icu4j-23.1.7.jar<br>│       ├── jniutils-23.1.7.jar<br>│       ├── js-language-23.1.7.jar<br>│       ├── junit-jupiter-api-5.11.0.jar<br>│       ├── junit-jupiter-params-5.11.0.jar<br>│       ├── junit-platform-commons-1.11.0.jar<br>│       ├── nativebridge-23.1.7.jar<br>│       ├── nativeimage-23.1.7.jar<br>│       ├── opentest4j-1.3.0.jar<br>│       ├── polyglot-23.1.7.jar<br>│       ├── README<br>│       ├── regex-23.1.7.jar<br>│       ├── truffle-api-23.1.7.jar<br>│       ├── truffle-compiler-23.1.7.jar<br>│       ├── truffle-enterprise-23.1.7.jar<br>│       ├── truffle-runtime-23.1.7.jar<br>│       └── word-23.1.7.jar<br>├── LICENSE.txt<br>├── linux-support<br>│   ├── man<br>│   │   ├── ords.1<br>│   │   ├── ords.conf.5<br>│   │   └── ords.service.8<br>│   ├── ords.conf<br>│   ├── ords.service<br>│   ├── ords.sh<br>│   └── README.md<br>├── NOTICE.txt<br>├── ords.war<br>├── scripts<br>│   ├── installer<br>│   │   ├── apex_ords_app_con_grants.sql<br>│   │   ├── ords_installer_privileges.sql<br>│   │   └── ords_set_editioning.sql<br>│   └── migrate<br>│       ├── ords_manual_migrate_workspace.sql<br>│       ├── ords_manual_migrate.sql<br>│       ├── ords_migrate_apex_rest.sql<br>│       ├── ords_migrate_report.sql<br>│       └── ords_migrate_workspace_rest.sql<br>└── THIRD-PARTY-LICENSES.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GX0vGCz9UJ-6DpZ4.jpeg" /></figure><p>Close out all of your terminal sessions. And make sure you are using the correct version of Java; you can check with the java --version command.</p><h4>Restart ORDS and test</h4><p>Restart ORDS, the ords/_/graphiql endpoint should be available. You can access it one of three ways:</p><ol><li>Directly by navigating to <a href="http://host:port/ords/[your">http://host:port/ords/[your</a> schema]/_/graphiql</li><li>From: the SQL Developer Web LaunchPad <em>or</em> the SQL Developer (Hamburger) menu</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*u3QAHIvPZt_KhB1r.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-_Hig8143Ckqi0Ta.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KNA1hn2II6IPRIWA.jpeg" /></figure><h3>The end</h3><p>That’s it. You should now have a <em>test/experimental</em> version of GraalVM for JDK 21 with the required Graal js and polyglot dependencies installed (much like you would with the now-deprecated gu installer).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7bd25188d5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adding X-Powered-By, Version, and Date Headers to ORDS Standalone]]></title>
            <link>https://chrishoina.medium.com/adding-x-powered-by-version-and-date-headers-to-ords-standalone-448927ba63b9?source=rss-887d963500db------2</link>
            <guid isPermaLink="false">https://medium.com/p/448927ba63b9</guid>
            <category><![CDATA[http-headers]]></category>
            <category><![CDATA[oracle-database]]></category>
            <category><![CDATA[enhanced-functionality]]></category>
            <category><![CDATA[jetty]]></category>
            <category><![CDATA[oracle-rest-data-services]]></category>
            <dc:creator><![CDATA[Chris Hoina]]></dc:creator>
            <pubDate>Sat, 31 May 2025 09:02:33 GMT</pubDate>
            <atom:updated>2025-05-31T09:02:33.731Z</atom:updated>
            <content:encoded><![CDATA[<h3>Additional functionality with Jetty XML</h3><p>Here is an example of a Jetty Context XML file that adds additional headers to your ORDS HTTP responses.</p><pre>&lt;?xml version=&quot;1.0&quot;?&gt;<br>&lt;!DOCTYPE Configure PUBLIC &quot;-//Jetty//Configure//EN&quot; &quot;http://www.eclipse.org/jetty/configure_10_0.dtd&quot;&gt;<br>&lt;Configure id=&quot;httpConfig&quot; class=&quot;org.eclipse.jetty.server.HttpConfiguration&quot;&gt;<br>    &lt;Set name=&quot;sendXPoweredBy&quot;&gt;<br>      &lt;Property name= &quot;jetty.send.xpoweredBy&quot; default=&quot;true&quot; /&gt;<br>    &lt;/Set&gt;<br>    &lt;Set name=&quot;sendServerVersion&quot;&gt;<br>      &lt;Property name=&quot;jetty.send.server.version&quot; default=&quot;true&quot; /&gt;<br>    &lt;/Set&gt;<br>    &lt;Set name=&quot;sendDateHeader&quot;&gt;<br>      &lt;Property name=&quot;jetty.send.date.header&quot; default=&quot;true&quot; /&gt;<br>    &lt;/Set&gt;<br>&lt;/Configure&gt;</pre><pre><strong>Note:</strong> This example is designed to show how you might structure a <br>Jetty Content XML file to add additional functionality to ORDS&#39; <br>embedded Jetty server. I&#39;m using ORDS in standalone mode, so if <br>you are using Apache Tomcat or Weblogic, this will not work.</pre><p>To test this out, first, create a Jetty XML file and populate the body with the contents in the above example. In this example, I’ve named the file jetty_headers.xml.</p><p>Next, place the file in your /etc folder*. Once there, start ORDS back up (i.e., ords serve). I have installed and deployed ORDS locally (i.e., localhost), with my configuration folder named configuration. With the full path being:</p><pre>/Users/choina/ords/configuration/global/standalone/etc/jetty_headers.xml</pre><p>For reference, here is a view of how my ORDS configuration folder is structured:</p><pre>.<br>├── databases<br>│   └── default<br>│       ├── pool.xml<br>│       └── wallet<br>│           └── cwallet.sso<br>└── global<br>    ├── settings.xml<br>    └── standalone<br>        ├── access_logs<br>        ├── etc<br>        │   └── jetty_headers.xml<br>        ├── self-signed.key<br>        └── self-signed.pem</pre><p>With everything in place, I can issue a request to one of my ORDS endpoints. In this case, I’ve created a simple GET Handler that queries the EMP table. The actual response isn&#39;t the focus, but rather the response headers.</p><p>I used cURL for this:</p><pre>curl http://localhost:8080/ords/hr/employees/</pre><p>In the response, I now see three new response headers displayed in a console output**:</p><p>- Server: Jetty(12.0.18)</p><p>- X-Powered-By: Jetty(12.0.18)</p><p>- Date: Sat, 24 2025 11:46:12 GMT</p><p>Below is a console log printout showing the full details of the request and response (excluding the response body):</p><pre>* Preparing request to http://localhost:8080/ords/hr/employees/<br>* Current time is 2025-05-24T11:46:12.857Z<br>* Enable automatic URL encoding<br>* Using default HTTP version<br>* Enable timeout of 30000ms<br>* Enable SSL validation<br>* Connection 9 seems to be dead<br>* Closing connection 9<br>* Hostname in DNS cache was stale, zapped<br>*   Trying 127.0.0.1:8080...<br>* Connected to localhost (127.0.0.1) port 8080 (#10)<br>&gt; GET /ords/hr/employees/ HTTP/1.1<br>&gt; Host: localhost:8080<br>&gt; User-Agent: insomnia/11.1.0<br>&gt; Accept: */*<br>* Mark bundle as not supporting multiuse<br>&lt; HTTP/1.1 200 OK<br>&lt; Server: Jetty(12.0.18)<br>&lt; X-Powered-By: Jetty(12.0.18)<br>&lt; Date: Sat, 24 May 2025 11:46:12 GMT<br>&lt; Content-Type: application/json<br>&lt; X-ORDS_DEBUG: true<br>&lt; ETag: &quot;yGRRTja1S+tUjM5cGRS/a6WnUiHoqAczoKJ0J5Ty9sAGg1QeeXN3G+BtUukHu9DWgxrpOAOaapoBAd++rVdl6g==&quot;<br>&lt; Transfer-Encoding: chunked<br><br>* Received 8.2 KB chunk<br>* Received 7 B chunk<br>* Connection #10 to host localhost left intact</pre><h3>Conclusion</h3><p>Arguably, the Server, X-Powered-By, and Date response headers could be considered functionally useless. However, for logging purposes, especially when it comes to huge applications or microservices more data can aid in quicker root-cause analyses.</p><p>In any case, pretty neat how you can easily add enhanced functionality to ORDS standalone with a few lines of XML.</p><h4>References</h4><ul><li><a href="https://jetty.org/docs/jetty/12/operations-guide/deploy/index.html">Deploying Jetty Context XML Files</a></li><li>About <a href="https://javadoc.jetty.org/jetty-12/org/eclipse/jetty/server/HttpConfiguration.html">the HttpConfiguration Class</a> (used in this example)</li><li>ORDS Installation and Configuration Guide: <a href="https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/25.1/ordig/miscellaneous-configuration-options-of-ORDS.html#GUID-A3798C5A-C6C6-40A2-826F-CE1CF0B8DDE2">Using Jetty XML Configuration Files</a></li></ul><h4>Footnotes</h4><ul><li>*You need to create this /etc folder manually. As of ORDS 25.1, this folder isn’t something that already exists. You might have a path similar to the one I shared above.</li><li>**You may notice the Date header is returned in GMT/Zulu. This will always be the case with ORDS. ORDS will always return data and times in GMT/Zulu format. For reference, if you independently alter the user.timezone JVM Option, this would only change how ORDS interprets dates and times where no timezone is attached. The Oracle Database Date and Timestamp are two examples where the timezone is not indicated.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=448927ba63b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ORDS 25.1 Release Highlights]]></title>
            <link>https://chrishoina.medium.com/ords-25-1-release-highlights-832a93a0cc21?source=rss-887d963500db------2</link>
            <guid isPermaLink="false">https://medium.com/p/832a93a0cc21</guid>
            <category><![CDATA[oracle-database]]></category>
            <category><![CDATA[release-notes]]></category>
            <category><![CDATA[autonomous-database]]></category>
            <category><![CDATA[oracle-rest-data-services]]></category>
            <category><![CDATA[restful-api]]></category>
            <dc:creator><![CDATA[Chris Hoina]]></dc:creator>
            <pubDate>Wed, 16 Apr 2025 14:51:19 GMT</pubDate>
            <atom:updated>2025-04-17T12:54:36.855Z</atom:updated>
            <content:encoded><![CDATA[<p>ORDS 25.1 is now available, here are the highlights 😀</p><h3>JWT roles-based scopes</h3><p>You are probably well aware of our current JWTs authentication and authorization support. But shortly after releasing this functionality, one of our long-time customers asked us to enhance ORDS JWT Profiles so they could also support roles “claims” (and scopes). So now, when creating your ORDS JWT Profile, you can set your p_role_claim_name =&gt; &#39;/roles&#39;. This setting would &quot;point&quot; to the roles you have configured within your identity provider (like IAM, IDCS, Auth0, etc.).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*t-wBLEMtXoqnZnPS.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RJFZuQhvtvVxEazJ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Xo-gkj6IsojOVtOc.png" /></figure><pre>🛎️ Come back to my blog in about two days, and you&#39;ll see a new <br>updated tutorial illustrating this new functionality <br>(with JSON Pointers for the roles-based claim).</pre><p>In the meantime, be sure to check out my current JWT-related blog posts:</p><ul><li><a href="https://followthecoffee.com/configuring-oci-iam-domain-jwts-to-use-with-ords/">Configuring OCI IAM Domain JWTs to use with ORDS OAuth2.0 protected APIs</a></li><li><a href="https://followthecoffee.com/ords-apis-and-microsoft-entra-jwts-tutorial/">Microsoft Entra OAuth2.0 JWTs and ORDS secure APIs Tutorial: Configuration and Testing</a></li><li><a href="https://followthecoffee.com/401-unauthorized-invalid_token-troubleshooting-oracle-cloud-iam-jwts-with-ords/">401 Unauthorized invalid_token — troubleshooting Oracle Cloud IAM JWTs with ORDS</a></li></ul><h3>ORDS_EXPORT and ORDS_EXPORT_ADMIN</h3><p>The most significant changes are available options for users you’ve granted the ORDS_ADMINISTRATOR_ROLE. Now, you can export another user&#39;s entire schema, including the details for their JWT Profile. In the screenshots below, you&#39;ll see examples of the ORDS_EXPORT_ADMIN.EXPORT_SCHEMA procedure, using various optional parameters.</p><pre>You have a lot of flexibility here; you can choose which optional <br>parameters to include. Can you spot the differences?</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*C-a6yyzC4FiJZBOx.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*g3_f7t37v4xMhDml.png" /><figcaption>An example showing the ENABLE_SCHEMA and RUNNABLE_AS_ADMIN parameters.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*J01vrrD--ZK-nBFi.png" /><figcaption>An example that consists of the SCHEMA parameter but turns off the RUNNABLE_AS_ADMIN parameter.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WIXUVOUrJKdI2lzK.png" /><figcaption>An example showing the new INCLUDE_JWT_PROFILES parameter.</figcaption></figure><h3>ORDS_SECURITY updates</h3><p>The next time you create an ORDS OAuth client, you might notice some changes to the UI. Under the covers, this action is made possible by the ORDS_SECURITY PL/SQL package. You can still use the older, now deprecated OAUTH packages, but we now default to these newer ORDS_SECURITY procedures and functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Xsjjkgh36-09e8Nh.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*h1Fjrt6p9h34L2DD.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*54flTb4IHDBQ6gke.png" /></figure><p>One of the most notable changes is that these procedures now follow the standard convention (you’ve probably seen elsewhere) of showing a Client’s Secret once and only once. The procedure is now more succinct, organized, and secure.</p><pre>💡When you need a new Client Secret, you can &quot;rotate&quot; it with the new <br><a href="https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/24.4/orddg/ords_security-pl-sql-package-reference.html#GUID-EBEE9B1D-C003-4962-9E27-E3B75F5ADD16">ROTATE_CLIENT_SECRET</a> functions (using the Client Name, Client Id, <br>ORDS/internal Id).</pre><h3>Dark mode</h3><p>Dark mode is activated. You can set SQL Developer Web (aka Database Actions) to <strong>Light</strong>, <strong>Dark</strong>, or <strong>Same as browser</strong>. I quite like the third option, as it makes shifting from Apple’s Light to Dark Mode seamless.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KQJLSpAootZheBIE.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sbCXaRTN07_tfYEM.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gySl6MW9DpgE5GRX.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fbviisCea5DJ-HaK.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FrmEWzm3-Oy_6SfV.png" /><figcaption>Including this here to remind you of the other available configurable settings.</figcaption></figure><h3>DBA_ORDS views</h3><p>These views aren’t new for this release, but I don’t think we’ve mentioned them recently. Any of your REST-enabled schemas can access these DBA_ORDS_[View Name] views (for their respective schemas), and they are really helpful when you need to quickly view your most important configurations.</p><p>Like always, you can drag and drop “objects” into the SQL Worksheet. After dropping, a modal will appear with different options (depending on the object type), allowing you to choose an action.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*v8Iy-SjH4rJVU1tL.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ol1cMUtoRGCtW-_N.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ru7xwrzY-wrqnydm.png" /></figure><h3>Important links</h3><p>And finally, the important links:</p><ul><li><a href="https://www.oracle.com/tools/ords/ords-relnotes-25.1.html">Official release notes</a></li><li><a href="https://www.oracle.com/database/sqldeveloper/technologies/db-actions/download/">Download ORDS </a><a href="https://www.oracle.com/database/sqldeveloper/technologies/db-actions/download/">/latest</a></li><li><a href="https://github.com/oracle/create-database-app/tree/3371fc3c22fbd604716b49fca9f7ff92ffd965b1/templates/ords-remix-jwt-sample">ORDS concert app (repo)</a></li></ul><p>That’s all for now. I am working on a JWT-using-roles tutorial, which should be out by Friday this week. I’ll update <a href="https://followthecoffee.com/">my blog</a> when it is live.</p><p>And I have another new ORDS plug-in tutorial that I’d like to share; this one is Java-based. My friend Reydan from the Oracle Health (via Cerner) side is integrating the heck out of their stuff with ORDS, and this example is something he came up with as an exploratory exercise. It’s nothing fancy, but I thought it would be great for the beginner.</p><p>And that’s all for now!</p><h3>Follow</h3><p>And don’t forget to follow, like, subscribe, share, taunt, troll, or stalk me!</p><ul><li><a href="https://followthecoffee.com/">Blog</a></li><li><a href="https://www.youtube.com/@chrishoina">YouTube</a></li><li><a href="https://www.linkedin.com/in/chrishoina/">LinkedIn</a></li><li><a href="https://www.instagram.com/chrishoina/">Instagram</a></li><li><a href="https://www.tiktok.com/@chrishoina">TikTok</a></li><li><a href="https://github.com/chrishoina">GitHub</a></li><li><a href="https://followthecoffee.com/setting-up-ssh-to-github-git-clone-into-your-oracle-cloud-linux-vm/">Mail</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=832a93a0cc21" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Troubleshooting: reviewing ORDS connections, your application server, and response times]]></title>
            <link>https://chrishoina.medium.com/troubleshooting-reviewing-ords-connections-your-application-server-and-response-times-4d51abe0def6?source=rss-887d963500db------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d51abe0def6</guid>
            <category><![CDATA[latency]]></category>
            <category><![CDATA[oracle-database]]></category>
            <category><![CDATA[response-time]]></category>
            <category><![CDATA[troubleshooting]]></category>
            <category><![CDATA[oracle-rest-data-services]]></category>
            <dc:creator><![CDATA[Chris Hoina]]></dc:creator>
            <pubDate>Wed, 09 Apr 2025 09:03:49 GMT</pubDate>
            <atom:updated>2025-04-09T09:03:49.453Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PbTh4xD1z5PZeWjd1pPs8A.png" /></figure><h3>Symptom/Issue</h3><p>In an internal Slack thread today, a user was trying to diagnose browser latency while attempting to connect to the ORDS landing page.</p><p>Peter suggested what I thought was a pretty neat heuristic for checking connections to ORDS and your database, as well as latency.</p><h3>Methodology</h3><p>Let’s say your symptoms are either <strong>slow loading</strong> or <strong>intermittent loss of service</strong> when attempting to reach an ORDS landing page. Your immediate thought might be to refresh your browser or bounce the ORDS server (if running in Standalone mode). But this isn’t practical in a production environment, nor is it practical if you have ORDS deployed on a Weblogic Server or Apache Tomcat (you can <a href="https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/24.4/ordig/deploying-and-monitoring-oracle-rest-data-services.html">deploy</a> using any of those three servers).</p><h3>Quick Heuristic</h3><p>Use cURL to test two different endpoints, compare their response times to each other, and compare to the response time you’ve observed historically(1).</p><h4>URL one</h4><p>This first URL points to where your ORDS instance “lives.”</p><pre>https://[my host]/ords</pre><p><strong><em>“Lives,” what does that mean?</em></strong> If you’re deploying to Weblogic Server ORDS would “live” in the $WEBLOGIC_HOME/application directory. In Apache Tomcat it is the $CATALINA/webapps directory, and on Standalone (using the ORDS embedded Jetty server) that might be $HOME/[your ords product folder].</p><p>So if you execute a cURL command to that URL, you’re issuing a request to your application server. With that single command, you can determine:</p><ol><li>if it’s even up</li><li>what the response is, and</li><li>how fast that response is</li></ol><p>Honestly, this sounds silly and obvious at first. But it costs you nothing to just rule out the application server as a culprit. The command(2) I tested (with the response included):</p><pre>curl -v -s -w &quot;\nTotal time: %{time_total}\n&quot; http://localhost:8080/ords                                <br>* Host localhost:8080 was resolved. <br>* IPv6: ::1 * IPv4: 127.0.0.1 <br>*   Trying [::1]:8080... <br>* Connected to localhost (::1) port 8080 <br>&gt; GET /ords HTTP/1.1 <br>&gt; Host: localhost:8080 <br>&gt; User-Agent: curl/8.7.1 <br>&gt; Accept: */* <br>&gt;  * Request completely sent off <br>&lt; HTTP/1.1 301 Moved Permanently <br>&lt; Location: /ords/ <br>&lt; Content-Length: 0 <br>&lt;  <br>* Connection #0 to host localhost left intact  <br><br>Total time: 0.001882</pre><pre><strong>NOTE:</strong> Make sure you issue this cURL command WITHOUT a trailing <br>slash after /ords. So like this: http://localhost:8080/ords<br>and NOT like this: http://localhost:8080/ords/. <br><br>If you include the trailing slash, you&#39;ll force a redirect to <br>the http://localhost:8080/ords/_/landing page <br>(this just adds unnecessary time to your result).</pre><h4>URL two</h4><p>The second cURL command you can issue is to the Metadata catalog for your/a target schema. In this example, I’m working with my ordsdemo user. He’s been REST-enabled, and I’ve already set up some Resource Modules (aka ORDS APIs). So I know there is “stuff” at that endpoint.</p><pre>https://[my host]/ords/[target schema]/metadata-catalog/</pre><p>Here is the cURL command I used (with the response included):</p><pre>curl -v -s -w &quot;\n\nTotal time: %{time_total}\n&quot; http://localhost:8080/ords/ordsdemo/metadata-catalog/  <br>* Host localhost:8080 was resolved. <br>* IPv6: ::1 <br>* IPv4: 127.0.0.1 <br>*   Trying [::1]:8080... <br>* Connected to localhost (::1) port 8080 <br>&gt; GET /ords/ordsdemo/metadata-catalog/ HTTP/1.1 <br>&gt; Host: localhost:8080 <br>&gt; User-Agent: curl/8.7.1 <br>&gt; Accept: */* <br>&gt;  * Request completely sent off <br>&lt; HTTP/1.1 200 OK <br>&lt; Content-Type: application/json <br>&lt; X-ORDS_DEBUG: true <br>&lt; X-Frame-Options: SAMEORIGIN <br>&lt; Transfer-Encoding: chunked <br>&lt;  <br>* Connection #0 to host localhost left intact <br>{&quot;items&quot;:[{&quot;name&quot;:&quot;MOVIE&quot;,&quot;links&quot;:[{&quot;rel&quot;:&quot;describes&quot;,&quot;href&quot;:&quot;http://localhost:8080/ords/ordsdemo/movie/&quot;},{&quot;rel&quot;:&quot;canonical&quot;,&quot;href&quot;:&quot;http://localhost:8080/ords/ordsdemo/metadata-catalog/movie/&quot;,&quot;mediaType&quot;:&quot;application/json&quot;},{&quot;rel&quot;:&quot;alternate&quot;,&quot;href&quot;:&quot;http://localhost:8080/ords/ordsdemo/open-api-catalog/movie/&quot;,&quot;mediaType&quot;:&quot;application/openapi+json&quot;}]},{&quot;name&quot;:&quot;moviestream&quot;,&quot;links&quot;:[{&quot;rel&quot;:&quot;describes&quot;,&quot;href&quot;:&quot;http://localhost:8080/ords/ordsdemo/mymovies/movie-all&quot;},{&quot;rel&quot;:&quot;canonical&quot;,&quot;href&quot;:&quot;http://localhost:8080/ords/ordsdemo/metadata-catalog/mymovies/movie-all&quot;,&quot;mediaType&quot;:&quot;application/json&quot;},{&quot;rel&quot;:&quot;alternate&quot;,&quot;href&quot;:&quot;http://localhost:8080/ords/ordsdemo/open-api-catalog/mymovies/&quot;,&quot;mediaType&quot;:&quot;application/openapi+json&quot;}]},{&quot;name&quot;:&quot;moviestream&quot;,&quot;links&quot;:[{&quot;rel&quot;:&quot;describes&quot;,&quot;href&quot;:&quot;http://localhost:8080/ords/ordsdemo/mymovies/movie-genre&quot;},{&quot;rel&quot;:&quot;canonical&quot;,&quot;href&quot;:&quot;http://localhost:8080/ords/ordsdemo/metadata-catalog/mymovies/movie-genre&quot;,&quot;mediaType&quot;:&quot;application/json&quot;},{&quot;rel&quot;:&quot;alternate&quot;,&quot;href&quot;:&quot;http://localhost:8080/ords/ordsdemo/open-api-catalog/mymovies/&quot;,&quot;mediaType&quot;:&quot;application/openapi+json&quot;}]},{&quot;name&quot;:&quot;test_endpoints&quot;,&quot;links&quot;:[{&quot;rel&quot;:&quot;describes&quot;,&quot;href&quot;:&quot;http://localhost:8080/ords/ordsdemo/no_objects/hello_auth&quot;},{&quot;rel&quot;:&quot;canonical&quot;,&quot;href&quot;:&quot;http://localhost:8080/ords/ordsdemo/metadata-catalog/no_objects/hello_auth&quot;,&quot;mediaType&quot;:&quot;application/json&quot;},{&quot;rel&quot;:&quot;alternate&quot;,&quot;href&quot;:&quot;http://localhost:8080/ords/ordsdemo/open-api-catalog/no_objects/&quot;,&quot;mediaType&quot;:&quot;application/openapi+json&quot;}]},{&quot;name&quot;:&quot;test_endpoints&quot;,&quot;links&quot;:[{&quot;rel&quot;:&quot;describes&quot;,&quot;href&quot;:&quot;http://localhost:8080/ords/ordsdemo/no_objects/hello_client_cred&quot;},{&quot;rel&quot;:&quot;canonical&quot;,&quot;href&quot;:&quot;http://localhost:8080/ords/ordsdemo/metadata-catalog/no_objects/hello_client_cred&quot;,&quot;mediaType&quot;:&quot;application/json&quot;},{&quot;rel&quot;:&quot;alternate&quot;,&quot;href&quot;:&quot;http://localhost:8080/ords/ordsdemo/open-api-catalog/no_objects/&quot;,&quot;mediaType&quot;:&quot;application/openapi+json&quot;}]}],&quot;hasMore&quot;:false,&quot;limit&quot;:25,&quot;offset&quot;:0,&quot;count&quot;:5,&quot;links&quot;:[{&quot;rel&quot;:&quot;self&quot;,&quot;href&quot;:&quot;http://localhost:8080/ords/ordsdemo/metadata-catalog/&quot;},{&quot;rel&quot;:&quot;first&quot;,&quot;href&quot;:&quot;http://localhost:8080/ords/ordsdemo/metadata-catalog/&quot;}]}  <br><br>Total time: 0.030173</pre><p>In the above example, we<em> are</em> hitting the database server (because we are grabbing the metadata catalog for the target schema). Consequently, the Total time for the round trip is slightly higher. Now, I can compare the two times against each other and against what I’ve seen historically. Are they reasonable? Do they pass the “sniff test”? Or do the results merit a deeper investigation?</p><h3>Fin</h3><p>I cannot stress this enough; this is just a simple heuristic <em>to get you started</em>. It takes 20 seconds to execute these commands. You’re really just “slicing the pie” at this stage. I honestly don’t think that simile applies here (unless you’ve ever cleared a room before), but you get the idea — thin slicing. Inching your way ever closer to the solution. This is just a part of the route-cause analysis.</p><p>That’s all for now. Keep this in your back pocket. If you have your own heuristics or troubleshooting tips, leave them in a comment below. I’d love to hear how you diagnose issues related to networking, connectivity, latency, etc.</p><p>Not sure where to begin?</p><ol><li>Download ORDS <a href="https://www.oracle.com/database/sqldeveloper/technologies/db-actions/download/">here</a></li><li>Review the <a href="https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/24.4/qsord/index.html">ORDS Quick Start Guide</a></li></ol><h3>Follow</h3><p>And don’t forget to follow, like, subscribe, share, taunt, troll, or stalk me!</p><ul><li><a href="https://followthecoffee.com/">Blog</a></li><li><a href="https://www.youtube.com/@chrishoina">YouTube</a></li><li><a href="https://www.linkedin.com/in/chrishoina/">LinkedIn</a></li><li><a href="https://www.instagram.com/chrishoina/">Instagram</a></li><li><a href="https://www.tiktok.com/@chrishoina">TikTok</a></li><li><a href="https://github.com/chrishoina">GitHub</a></li><li><a href="https://followthecoffee.com/setting-up-ssh-to-github-git-clone-into-your-oracle-cloud-linux-vm/">Mail</a></li></ul><h3>Footnotes</h3><p>(1) I was hesitant to include this last part, “you’ve observed historically,” because I don’t give a metric. Honestly, it depends on your workload. But if you are doing any sort of performance testing you probably have at least a good sense of what response times should be like for your application (I’m talking directly to developers here). Even if you <em>don’t</em> know these expected response times, you can still compare the individual results against each other: the first URL vs the second URL, in this example.</p><p>(2) What do the optional -v -w -s variables mean? Good question -v is shorthand for “Verbose;” which means print out as much info as is available. The -s is shorthand for “Silent;” in other words, don’t show any progress bars. And the -w means “Write Out,” in this case, “explicitly write out the Total time for me please.”</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d51abe0def6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[401 Unauthorized invalid_token — troubleshooting Oracle Cloud IAM JWTs with ORDS]]></title>
            <link>https://chrishoina.medium.com/401-unauthorized-invalid-token-troubleshooting-oracle-cloud-iam-jwts-with-ords-a54e3297ab70?source=rss-887d963500db------2</link>
            <guid isPermaLink="false">https://medium.com/p/a54e3297ab70</guid>
            <category><![CDATA[oracle-rest-data-services]]></category>
            <category><![CDATA[jwt]]></category>
            <category><![CDATA[oci]]></category>
            <category><![CDATA[troubleshooting]]></category>
            <category><![CDATA[oracle-database]]></category>
            <dc:creator><![CDATA[Chris Hoina]]></dc:creator>
            <pubDate>Mon, 07 Apr 2025 14:55:00 GMT</pubDate>
            <atom:updated>2025-04-07T14:55:00.818Z</atom:updated>
            <content:encoded><![CDATA[<h3>401 Unauthorized invalid_token — troubleshooting Oracle Cloud IAM JWTs with ORDS</h3><h3>Symptoms</h3><p>You are able to request an access token from OCI IAM. Yet, when you issue the subsequent request to your target resource (an ORDS endpoint), you receive the following message (error=&quot;invalid_token&quot;):</p><pre>WWW-Authenticate: Bearer realm=&quot;Oracle REST Data Services&quot;, <br>error=&quot;invalid_token&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qxVZVBAepy7JWg-g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*G9uEsOjQmb0CF1HW.png" /></figure><h3>Actions you’ve taken</h3><ol><li>You’ve done the following in OCI:<br>- Registered an Integrated Application with Oracle Identity and Access Management (IAM)<br>- Created a Primary Audience &amp; Scope<br>- Obtained your Client ID and Client Secret<br>- Configured your networking correctly (or at least have high confidence it’s configured correctly)<br>- Acquired <em>all</em> of the correct, relevant URIs:<br>- Authorization<br>- Access Token<br>- JWK</li><li>You’ve configured the following in ORDS:<br>- Created your JWT Profile according to the <a href="https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/24.4/orddg/developing-REST-applications.html#GUID-32E8F21C-A2CA-4DB5-B1BB-9E5119FCB667">docs</a> (or <a href="https://followthecoffee.com/configuring-oci-iam-domain-jwts-to-use-with-ords/">this tutorial</a>)<br>- Created the JWT Role and Privilege (which should be the same as the OCI Scope name)<br>- And protected your target resource (aka ORDS API)</li><li>You’ve placed everything where it should be in your choice of API testing tool (cURL, Postman, Insomnia, etc.).</li></ol><p><strong><em>YET</em></strong>…you still receive this error=&quot;invalid_token&quot; message, it is quite possible that you have not made the JWK URL publically accessible in OCI IAM.</p><h3>Solution</h3><p>Here is how you can verify and resolve this issue. First, navigate to your domain, then select <strong>Settings</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M7-UUBV0ZVhw8T0d.png" /></figure><p>If this <strong>Configure client access</strong> box is unchecked, it is likely the culprit. Check it, then select <strong>Save Changes</strong> (the button at the bottom of the screen).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*we5GXuScimorDUzF.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*W4csREcFmCbmASoi.png" /></figure><pre>This box <strong><em>must be checked</em></strong> so your application can automatically access <br>a JWK URL (to be used for decoding a JWT) without having to sign in <br>to the OCI tenancy.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VJ7J6GlDRZGdSyyH.png" /></figure><p>Then, once you re-attempt your HTTP request, ORDS will be able to:</p><ol><li>Access the JWK URL (which you’ve included when you created your JWT Profile)</li><li>Verify the authenticity of your JWT, and</li><li>Respond with the results from your resource (ORDS endpoint)</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HuHhLZfzcmxLzxgR.png" /></figure><p><strong>Et voilà! </strong>And that’s it, you’re back in business!</p><h3>To-do list</h3><p>I think we have some action items, too:</p><ul><li>Investigate this error message and see if we can improve the message to the user (we’ve already filed an enhancement request on this)</li><li>Update <a href="https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/24.4/orddg/developing-REST-applications.html#GUID-02B6DC5B-347A-417A-855F-C4A3F4B77538">the docs</a> to be more specific on this setting and where to find it (a documentation bug has already been filed for this)</li><li>Determine if this is a good candidate for adding to the <a href="https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/24.4/orddg/troubleshooting-REST.html">troubleshooting section</a> of our guide</li><li>Update <a href="https://followthecoffee.com/configuring-oci-iam-domain-jwts-to-use-with-ords/">my JWT tutorial</a></li></ul><p>And that’s all for now. ORDS version 25.1 is right around the corner, so look out for <a href="https://www.oracle.com/database/sqldeveloper/technologies/db-actions/download/">the official release notes</a> and my accompanying blog too!</p><h3>Follow</h3><p>And don’t forget to follow, like, subscribe, share, taunt, troll, or stalk me!</p><ul><li><a href="https://followthecoffee.com/">Blog</a></li><li><a href="https://www.youtube.com/@chrishoina">YouTube</a></li><li><a href="https://www.linkedin.com/in/chrishoina/">LinkedIn</a></li><li><a href="https://www.instagram.com/chrishoina/">Instagram</a></li><li><a href="https://www.tiktok.com/@chrishoina">TikTok</a></li><li><a href="https://github.com/chrishoina">GitHub</a></li><li><a href="https://followthecoffee.com/setting-up-ssh-to-github-git-clone-into-your-oracle-cloud-linux-vm/">Mail</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a54e3297ab70" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A simple ORDS GET request using the Go language]]></title>
            <link>https://chrishoina.medium.com/a-simple-ords-get-request-using-the-go-language-5182a8508da5?source=rss-887d963500db------2</link>
            <guid isPermaLink="false">https://medium.com/p/5182a8508da5</guid>
            <category><![CDATA[go]]></category>
            <category><![CDATA[api-integration]]></category>
            <category><![CDATA[oracle-rest-data-services]]></category>
            <category><![CDATA[oracle-database]]></category>
            <category><![CDATA[plsql]]></category>
            <dc:creator><![CDATA[Chris Hoina]]></dc:creator>
            <pubDate>Fri, 04 Apr 2025 15:30:14 GMT</pubDate>
            <atom:updated>2025-04-04T15:30:14.186Z</atom:updated>
            <content:encoded><![CDATA[<p>Venkata this one’s for you 😀</p><p>It took me the rest of the afternoon, but here is a pretty simple GET request example, using a user-defined ORDS API. This API is derived from one of our <a href="https://apexapps.oracle.com/pls/apex/f?p=133:180:108320277372784::::wid:3382">LiveLabs</a>, a Python + JavaScript application. But this particular scenario pretty well exemplifies what we discussed in our presentation yesterday—that the RESTful framework makes your backend code much more language-agnostic. With a few tweaks, I was able to “port” this over to Go.</p><h3>ORDS example API</h3><p>The ORDS API I’m working with looks like this on the back end (this is our REST Workshop; where you build ORDS APIs):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*keS_pIeDC0qq8Oz04Xy4ug.png" /></figure><p>More formally, it looks like this:</p><pre>SELECT DISTINCT<br>    GENRE<br>FROM<br>    MOVIE,<br>    JSON_TABLE ( GENRES, &#39;$[*]&#39;<br>            COLUMNS (<br>                GENRE PATH &#39;$&#39;<br>            )<br>        )<br>ORDER BY<br>    1 ASC</pre><p>The MOVIE table I’m calling upon consists of various data types, but the target GENRE In this case, the column is a JSON object that actually contains an array. So, all I’m doing is returning the unique genres (i.e., removing duplicates) from a table of thousands of movies. What is nice about this approach is that all my SQL and PL/SQL stay in the database. All my application’s code needs now is an endpoint.</p><p>If I don’t want to keep pinging that endpoint, I can always just use a JSON document as a proxy for the endpoint. And if I just point my browser to that URI (i.e. ORDS API), here is what the results look like (I had to take two screenshots to capture everything):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-C-LG3dM6JL_qhkr.png" /><figcaption>Top of the page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*I7h0Wlhatca8hC_I.png" /><figcaption>Bottom of the page</figcaption></figure><p>When you are looking at these results, it’s best to focus on the “root” key:value pairs of the ORDS response. For a fairly standard ORDS GETrequest, the response body will consist of:</p><ul><li>items</li><li>hasMore</li><li>limit</li><li>offset</li><li>count, and</li><li>links</li></ul><p>When I collapse my example, I am left with the following:</p><pre>{<br>    &quot;items&quot;: [<br>    ],<br>    &quot;hasMore&quot;: false,<br>    &quot;limit&quot;: 25,<br>    &quot;offset&quot;: 0,<br>    &quot;count&quot;: 24,<br>    &quot;links&quot;: [<br>    ]<br>}</pre><pre>Note: The items will be an array, as will the links.</pre><p>A caveat to this is when/if you choose to Auto-REST enable an object, the result will look <em>mostly</em> the same. However, ORDS adds a self-referential link to each result. But those links are an array, too.</p><p>Regardless, it shouldn’t affect how you approach this in Go. The struct of those types are the same: Items []Items json:&quot;items&quot; and Links []Links json:&quot;links&quot;, respectively. Compare this auto-REST-enabled result to the one above:</p><pre>Worth noting: The image below is using a different endpoint. Its <br>basically doing a &quot;select * from movies;&quot; on the MOVIES table. <br>Hence, why it looks a little different. But you should still be <br>able to see what I am talking about. If you want to learn more about <br>ORDS Auto-REST, then <a href="https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/24.4/orddg/developing-REST-applications.html#GUID-4CE630AA-2F06-41D9-96F6-DA77AB1E6395">check this out</a>.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UUiSugrJnBHvyCMg-2WBUw.png" /><figcaption>If you squint, you can see how each result has its own “rel” link. That is how Auto-REST would look, this is expected.</figcaption></figure><h3>Go time</h3><p>Coming from Python and PL/SQL, along with <em>some</em> JavaScript, I found Go to be extremely enjoyable. I get the gist of how you define the types and structures of “things.” I haven’t even bothered to look at the documentation yet; I didn’t even need to. It was easy to follow along using the two tutorials I found (here and here). After a few minutes of debugging (which is quite intuitive in Go, actually), I had my code working.</p><p>Actually, once I figured out the syntax and Go idiosyncracies, creating this simple example wasn’t much of an effort.</p><p>Here is the Go code that I came up with:</p><pre>package main<br><br>import (<br> &quot;encoding/json&quot;<br> &quot;fmt&quot;<br> &quot;io/ioutil&quot;<br> &quot;log&quot;<br> &quot;net/http&quot;<br> &quot;os&quot;<br>)<br><br>type Response struct {<br> Items   []Items `json:&quot;items&quot;`<br> Hasmore bool    `json:&quot;hasMore&quot;`<br> Limit   int     `json:&quot;limit&quot;`<br> Offset  int     `json:&quot;offset&quot;`<br> Count   int     `json:&quot;count&quot;`<br> Links   []Links `json:&quot;links&quot;`<br>}<br><br>type Items struct {<br> Genre string `json:&quot;genre&quot;`<br>}<br><br>type Links struct {<br> Rel  string `json:&quot;rel&quot;`<br> Href string `json:&quot;href&quot;`<br>}<br><br>func main() {<br> response, err := http.Get(&quot;http://localhost:8081/ords/ordsdemo/mymovies/movie-genre&quot;)<br> if err != nil {<br>  fmt.Print(err.Error())<br>  os.Exit(1)<br> }<br><br> responseData, err := ioutil.ReadAll(response.Body)<br> if err != nil {<br>  log.Fatal(err)<br> }<br><br> var responseObject Response<br> json.Unmarshal(responseData, &amp;responseObject)<br> for i := 0; i &lt; len(responseObject.Items); i++ {<br>  fmt.Println(responseObject.Items[i].Genre)<br> }<br><br> fmt.Println(responseObject.Hasmore)<br> fmt.Println(responseObject.Limit)<br> fmt.Println(responseObject.Offset)<br> fmt.Println(responseObject.Count)<br> for i := 0; i &lt; len(responseObject.Links); i++ {<br>  fmt.Println(responseObject.Links[i].Rel + responseObject.Links[i].Href)<br> }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UIymQq2ykrncVVxD.png" /></figure><p>If you know Go, then I’m not teaching you anything that you don’t already know. You probably know the libraries I’m using. However, I think it is worth pointing out a few ORDS-specific things.</p><p>When it comes to the items and the links they are always going to be an array. So you’ll need to account for that when you are defining the structures (aka struct) for your user-defined types (let me know if this terminology is correct, it just seems so intuitive, so I’m going with it).</p><p>Here are some other things to consider:</p><ul><li>hasMore is a Boolean; or bool in Go. It’s also going to be either true or false.True means there are more results (so you can page forward if you want).False means there are no more results.</li><li>limit just means how many results you should expect. In my case, 25 results (that is our default, but you can adjust this when you build your APIs). Another way to look at this is that my pagination is set to 25 results per page.</li><li>offset and limit are kind of interdependent. If you are on the first page then your offset will be = 0. But if you wanted to view your second “page” or set of results, then you’d set your offset = 25. And because your limit = 25 then you’d see results 26-50.</li><li>The count is just the total results per page, or 25 in this case (hypothetically, if you were to make it to the end of your results set, it would probably not be exactly 25, something to keep in mind).</li></ul><p>Here is a complete JSON object of my first results (if you want to play around with it until you get ORDS up and running):</p><pre>{<br>    &quot;items&quot;: [<br>        {<br>            &quot;genre&quot;: &quot;Action&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Adventure&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Animation&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Biography&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Comedy&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Crime&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Documentary&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Drama&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Family&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Fantasy&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Film-Noir&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;History&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Horror&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Lifestyle&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Musical&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Mystery&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Reality-TV&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Romance&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Sci-Fi&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Sport&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Thriller&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Unknown&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;War&quot;<br>        },<br>        {<br>            &quot;genre&quot;: &quot;Western&quot;<br>        }<br>    ],<br>    &quot;hasMore&quot;: false,<br>    &quot;limit&quot;: 25,<br>    &quot;offset&quot;: 0,<br>    &quot;count&quot;: 24,<br>    &quot;links&quot;: [<br>        {<br>            &quot;rel&quot;: &quot;self&quot;,<br>            &quot;href&quot;: &quot;http://localhost:8081/ords/ordsdemo/mymovies/movie-genre&quot;<br>        },<br>        {<br>            &quot;rel&quot;: &quot;describedby&quot;,<br>            &quot;href&quot;: &quot;http://localhost:8081/ords/ordsdemo/metadata-catalog/mymovies/item&quot;<br>        },<br>        {<br>            &quot;rel&quot;: &quot;first&quot;,<br>            &quot;href&quot;: &quot;http://localhost:8081/ords/ordsdemo/mymovies/movie-genre&quot;<br>        }<br>    ]<br>}</pre><p>All the code you see here is also in my <a href="https://github.com/chrishoina/blogrepo/tree/main/go">blog post code repo</a>. There are other examples there, too!</p><p>Also, huge thanks for asking about Go. It gave me an excuse to start learning it. I think I might be a Go fanboi now 🫣!</p><p>And for all others reading:</p><h3>Follow</h3><p>And don’t forget to follow, like, subscribe, share, taunt, troll, or stalk me!</p><ul><li><a href="https://followthecoffee.com/">Blog</a></li><li><a href="https://www.youtube.com/@chrishoina">YouTube</a></li><li><a href="https://www.linkedin.com/in/chrishoina/">LinkedIn</a></li><li><a href="https://www.instagram.com/chrishoina/">Instagram</a></li><li><a href="https://www.tiktok.com/@chrishoina">TikTok</a></li><li><a href="https://github.com/chrishoina">GitHub</a></li><li><a href="https://followthecoffee.com/setting-up-ssh-to-github-git-clone-into-your-oracle-cloud-linux-vm/">Mail</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5182a8508da5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Example: an ORDS API that returns a user-configured JSON object]]></title>
            <link>https://chrishoina.medium.com/example-an-ords-api-that-returns-a-user-configured-json-object-34bd83656d5a?source=rss-887d963500db------2</link>
            <guid isPermaLink="false">https://medium.com/p/34bd83656d5a</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[ord]]></category>
            <category><![CDATA[plsql]]></category>
            <category><![CDATA[jwt]]></category>
            <category><![CDATA[oracle-rest-data-services]]></category>
            <dc:creator><![CDATA[Chris Hoina]]></dc:creator>
            <pubDate>Thu, 03 Apr 2025 20:12:50 GMT</pubDate>
            <atom:updated>2025-04-04T15:31:16.790Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hAevKWpI_AWwCmB1.png" /></figure><p>This actually came about from a Support Request. We were troubleshooting a JWT issue, that had ORDS in the mix. Ultimately, this is looking more and more like a networking issue (maybe something to do with routing rules between the load balancer and the backend server).</p><p>But in the course of our troubleshooting, we wanted to rule out some variables. One of those variables was the JWK URL we were using for the ORDS_SECURITY.CREATE_JWT_PROFILE procedure. So we had this idea to kind of fool ORDS into thinking it was visiting the IDCS (the predecessor to <a href="https://www.oracle.com/security/identity-management/">Oracle IAM</a>) JWK URL when, in fact, it was just visiting another ORDS endpoint.</p><p><strong>Obvious disclaimer: NOT FOR PRODUCTION USE. For troubleshooting purposes only. </strong>This article just serves as an example of how you can build <em>TONs</em> of ORDS APIs without always having to create a table, JSON collection, function, procedure, view, etc…</p><p>If you’ve seen my JWT + ORDS tutorials (one for <a href="https://followthecoffee.com/configuring-oci-iam-domain-jwts-to-use-with-ords/">OCI IAM</a>, another for <a href="https://followthecoffee.com/ords-apis-and-microsoft-entra-jwts-tutorial/">Microsoft Azure</a>), then you know when you create an ORDS JWT Profile, it will look something like this:</p><pre>BEGIN<br>  ORDS_SECURITY.CREATE_JWT_PROFILE(<br>      p_issuer =&gt; &#39;https://identity.oraclecloud.com/&#39;,<br>      p_audience =&gt; &#39;my_primary_audience&#39; ,<br>      p_jwk_url =&gt;&#39;https://idcs-10a10a10a10a10a10a10a10a.identity.oraclecloud.com/admin/v1/SigningCert/jwk&#39;<br>  );<br>  COMMIT;<br>END;<br>/</pre><p>In the above code block, just know that p_issuer is your Identity Provider (e.g., IAM, IDCS, Microsoft Entra, etc.), p_audience is the Primary Audience (which you created when you registered your client application with your Identity Provider), and the p_jwk_url is where ORDS goes to look up the keys for decoding a JWT.</p><p>The eventual JWT that ORDS receives would include the Issuer and Audience, too. But it would also include other values such as the Scope. That Scope name would be associated with the ORDS Privilege–the privilege you created <em>specifically</em> to use for protecting/associating with your ORDS Resource Module. And ORDS would use all these values (and the JWK “keys” found at that JWK URL to decode the JWT) together to:</p><ol><li>Verify you are who you say you are, <em>and</em></li><li>You have the proper Scope (or as ORDS interprets it…the proper privilege) to access this protected resource</li></ol><p><strong>TL;DR </strong>This recap wasn’t meant to explain in detail how JWTs work, but rather meant to demonstrate how everything is interconnected. ORDS can’t do anything with a JWT unless an ORDS JWT Profile has been created beforehand. That JWT Profile itself works in tandem with the ORDS Privilege. And that Privilege is the same name as your Scope. So if the Privilege doesn’t exist, the Profile is worthless. And if the Scope doesn’t exist, well then certainly nothing is going to work! And until all that “stuff” is connected, then that protected resource cannot be reached.</p><p>Here is how we structured the Handler code:</p><pre>BEGIN<br>    HTP.P(&#39;{&quot;<br>    keys&quot;: [<br>        {<br>            &quot;kty&quot;: &quot;RSA&quot;,<br>            &quot;x5t#S256&quot;: &quot;Lorem ipsum dolor sit amet__pellentesque elementum&quot;,<br>            &quot;e&quot;: &quot;AQAB&quot;,<br>            &quot;x5t&quot;: &quot;xwSmccaQZDvAZPOpZPHOiQDlLgo&quot;,<br>            &quot;kid&quot;: &quot;SIGNING_KEY&quot;,<br>            &quot;x5c&quot;: [<br>                &quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce lorem dui, elementum et odio ut, sollicitudin gravida dui. Ut nec dapibus elit. Morbi sit amet blandit justo. Quisque accumsan turpis metus, vel sodales nisl porta vel. Nunc placerat, mi id eleifend pharetra, massa urna imperdiet arcu, vitae dignissim nulla ex sed felis. Maecenas auctor risus ac nisl efficitur, sit amet euismod odio finibus. Praesent lacinia nunc id ex tempor, sed tempor nisl porta. Integer semper efficitur arcu, a dictum quam vulputate tempus. Nulla congue dapibus tortor vel volutpat. Curabitur et sollicitudin purus. Mauris quis aliquam augue. Nulla ac leo tristique, ultricies mauris sit amet, ultrices quam. Praesent placerat a lectus sit amet dapibus. Donec rhoncus felis velit, sed placerat nunc pellentesque elementum==&quot;,<br>&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce lorem dui, elementum et odio ut, sollicitudin gravida dui. Ut nec dapibus elit. Morbi sit amet blandit justo. Quisque accumsan turpis metus, vel sodales nisl porta vel. Nunc placerat, mi id eleifend pharetra, massa urna imperdiet arcu, vitae dignissim nulla ex sed felis. Maecenas auctor risus ac nisl efficitur, sit amet euismod odio finibus. Praesent lacinia nunc id ex tempor, sed tempor nisl porta. Integer semper efficitur arcu, a dictum quam vulputate tempus. Nulla congue dapibus tortor vel volutpat. Curabitur et sollicitudin purus. Mauris quis aliquam augue. Nulla ac leo tristique, ultricies mauris sit amet, ultrices quam. Praesent placerat a lectus sit amet dapibus. Donec rhoncus felis velit, sed placerat nunc pellentesque elementum&quot;<br>            ],<br>            &quot;key_ops&quot;: [<br>                &quot;verify&quot;,<br>                &quot;wrapKey&quot;,<br>                &quot;encrypt&quot;<br>            ],<br>            &quot;alg&quot;: &quot;RS256&quot;,<br>            &quot;n&quot;: <br>&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce lorem dui, elementum et odio ut, sollicitudin gravida dui. Ut nec dapibus elit. Morbi sit amet blandit justo. Quisque accumsan turpis metus, vel sodales nisl porta vel. Nunc placerat, mi id eleifend pharetra, massa urna imperdiet arcu, vitae dignissim nulla&quot;<br>        }<br>    ]<br>}&#39;);<br>END;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lYQa3DFrXp3MCmwg.png" /></figure><p><strong>FYI:</strong> The complete PL/SQL Module Export is at the end(if you want to take a closer look).</p><p>With that new ORDS endpoint, we (temporarily) recreated the ORDS JWT Profile with the new ORDS API as a <em>proxy</em> for our <em>true</em> JWK URL. Like this (this JWK URL is entirely fake, BTW):</p><pre>BEGIN<br>  ORDS_SECURITY.CREATE_JWT_PROFILE(<br>      p_issuer =&gt; &#39;https://identity.oraclecloud.com/&#39;,<br>      p_audience =&gt; &#39;my_primary_audience&#39; ,<br>      p_jwk_url =&gt; &#39;https://abcdefg-myadb.region-01.oraclecloudapps.com/ords/admin/jwk/jwk&#39;<br>  );<br>  COMMIT;<br>END;<br>/</pre><p>Hypothetically if you were to navigate to that ORDS URI, you’d see a <em>facsimile</em> of the <em>actual</em> JWK information:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XpNRZMlnP8G2iGwL.png" /></figure><p>So now, we’ve temporarily removed the JWK URL from the troubleshooting equation. However, we can still access that protected endpoint since we have a valid token and keys to decode it (courtesy of the ORDS endpoint we created)!</p><p>And <strong><em>this</em></strong> my friends, is the type of mad scientist stuff that I live for. I had to share our experience to underscore two main points:</p><ol><li>You have a lot of flexibility with these ORDS APIs, and</li><li>When it comes to troubleshooting/root cause analysis, you must break things down into individual parts!</li></ol><p>And that’s it for today. Class dismissed 🤓</p><p><strong>BTW</strong>, I took some inspiration from <a href="https://www.thatjeffsmith.com/archive/2017/09/ords-returning-raw-json/">here</a> too. And of course, a link to the <a href="https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/24.4/orddg/developing-REST-applications.html#GUID-02B6DC5B-347A-417A-855F-C4A3F4B77538">JWT section of our docs</a>.</p><h3>Follow</h3><p>And don’t forget to follow, like, subscribe, share, taunt, troll, or stalk me!</p><ul><li><a href="https://followthecoffee.com/">Blog</a></li><li><a href="https://www.youtube.com/@chrishoina">YouTube</a></li><li><a href="https://www.linkedin.com/in/chrishoina/">LinkedIn</a></li><li><a href="https://www.instagram.com/chrishoina/">Instagram</a></li><li><a href="https://www.tiktok.com/@chrishoina">TikTok</a></li><li><a href="https://github.com/chrishoina">GitHub</a></li><li><a href="https://followthecoffee.com/setting-up-ssh-to-github-git-clone-into-your-oracle-cloud-linux-vm/">Mail</a></li></ul><pre><br>-- Generated by ORDS REST Data Services 24.4.1.r0381713<br>-- Schema: ADMIN  Date: Thu Apr 03 07:10:42 2025 <br>--<br>        <br>BEGIN<br>  ORDS.DEFINE_MODULE(<br>      p_module_name    =&gt; &#39;jwk&#39;,<br>      p_base_path      =&gt; &#39;/jwk/&#39;,<br>      p_items_per_page =&gt; 25,<br>      p_status         =&gt; &#39;PUBLISHED&#39;,<br>      p_comments       =&gt; NULL);<br><br>  ORDS.DEFINE_TEMPLATE(<br>      p_module_name    =&gt; &#39;jwk&#39;,<br>      p_pattern        =&gt; &#39;jwk&#39;,<br>      p_priority       =&gt; 0,<br>      p_etag_type      =&gt; &#39;HASH&#39;,<br>      p_etag_query     =&gt; NULL,<br>      p_comments       =&gt; NULL);<br><br>  ORDS.DEFINE_HANDLER(<br>      p_module_name    =&gt; &#39;jwk&#39;,<br>      p_pattern        =&gt; &#39;jwk&#39;,<br>      p_method         =&gt; &#39;GET&#39;,<br>      p_source_type    =&gt; &#39;plsql/block&#39;,<br>      p_mimes_allowed  =&gt; NULL,<br>      p_comments       =&gt; NULL,<br>      p_source         =&gt; <br>&#39;BEGIN<br>    HTP.P(&#39;&#39;{&quot;<br>    keys&quot;: [<br>        {<br>            &quot;kty&quot;: &quot;RSA&quot;,<br>            &quot;x5t#S256&quot;: &quot;Lorem ipsum dolor sit amet__pellentesque elementum&quot;,<br>            &quot;e&quot;: &quot;AQAB&quot;,<br>            &quot;x5t&quot;: &quot;xwSmccaQZDvAZPOpZPHOiQDlLgo&quot;,<br>            &quot;kid&quot;: &quot;SIGNING_KEY&quot;,<br>            &quot;x5c&quot;: [<br>                &quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce lorem dui, elementum et odio ut, sollicitudin gravida dui. Ut nec dapibus elit. Morbi sit amet blandit justo. Quisque accumsan turpis metus, vel sodales nisl porta vel. Nunc placerat, mi id eleifend pharetra, massa urna imperdiet arcu, vitae dignissim nulla ex sed felis. Maecenas auctor risus ac nisl efficitur, sit amet euismod odio finibus. Praesent lacinia nunc id ex tempor, sed tempor nisl porta. Integer semper efficitur arcu, a dictum quam vulputate tempus. Nulla congue dapibus tortor vel volutpat. Curabitur et sollicitudin purus. Mauris quis aliquam augue. Nulla ac leo tristique, ultricies mauris sit amet, ultrices quam. Praesent &#39; || &#39;placerat a lectus sit amet dapibus. Donec rhoncus felis velit, sed placerat nunc pellentesque elementum==&quot;,<br>&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce lorem dui, elementum et odio ut, sollicitudin gravida dui. Ut nec dapibus elit. Morbi sit amet blandit justo. Quisque accumsan turpis metus, vel sodales nisl porta vel. Nunc placerat, mi id eleifend pharetra, massa urna imperdiet arcu, vitae dignissim nulla ex sed felis. Maecenas auctor risus ac nisl efficitur, sit amet euismod odio finibus. Praesent lacinia nunc id ex tempor, sed tempor nisl porta. Integer semper efficitur arcu, a dictum quam vulputate tempus. Nulla congue dapibus tortor vel volutpat. Curabitur et sollicitudin purus. Mauris quis aliquam augue. Nulla ac leo tristique, ultricies mauris sit amet, ultrices quam. Praesent placerat a lectus sit amet dapibus. Donec rhoncus felis velit, sed placerat nunc pellentesque elementum&quot;<br>            ],<br>            &quot;key_ops&quot;: [<br>                &quot;verify&quot;,<br>              &#39; || &#39;  &quot;wrapKey&quot;,<br>                &quot;encrypt&quot;<br>            ],<br>            &quot;alg&quot;: &quot;RS256&quot;,<br>            &quot;n&quot;: <br>&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce lorem dui, elementum et odio ut, sollicitudin gravida dui. Ut nec dapibus elit. Morbi sit amet blandit justo. Quisque accumsan turpis metus, vel sodales nisl porta vel. Nunc placerat, mi id eleifend pharetra, massa urna imperdiet arcu, vitae dignissim nulla&quot;<br>        }<br>    ]<br>}&#39;&#39;);<br>END;&#39;);<br><br>    <br>        <br>COMMIT;<br><br>END;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34bd83656d5a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[503 Service Unavailable: ORDS unable to make a connection…all connections in the Univeral…]]></title>
            <link>https://chrishoina.medium.com/503-service-unavailable-ords-unable-to-make-a-connection-all-connections-in-the-univeral-24aaee36d004?source=rss-887d963500db------2</link>
            <guid isPermaLink="false">https://medium.com/p/24aaee36d004</guid>
            <category><![CDATA[connection-pool]]></category>
            <category><![CDATA[oracle-database]]></category>
            <category><![CDATA[oracle-rest-data-services]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[troubleshooting]]></category>
            <dc:creator><![CDATA[Chris Hoina]]></dc:creator>
            <pubDate>Thu, 13 Mar 2025 17:52:06 GMT</pubDate>
            <atom:updated>2025-03-14T13:37:43.367Z</atom:updated>
            <content:encoded><![CDATA[<h3>503 Service Unavailable: ORDS unable to make a connection…all connections in the Univeral connection Pool are in use — [30,30,42….]</h3><h3>Have you ever seen this?</h3><p>Have you ever seen a message like this while working with ORDS? The one where you receive a 503 Service Unavailable response code and message?</p><p>This message has something to do with ORDS being unable to make a connection to the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NxuFIOPHPAsnG78c.png" /></figure><p>But if you keep reading, you’ll see even more information- something related to the Universal Connection Pool- followed by an array of numbers. Did you know that the “stuff” in that array is actually helpful information?</p><p>Well…Kris knew.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*msOCuESdPeuM6bu2.png" /></figure><h3>What does it all mean?</h3><p>But for the rest of us plebes, what does “max = 30 and current in use = 30” refer to? Well, let’s figure it out!</p><p>Take a closer look at the above image. You’ll see an array consisting of the following: [30, 30, 42, 12, 0, 30, 1, 0, 29]. Which, according to the Universal Connection Pool documentation, translates to:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JC4M6Xe-ytxAULOS.png" /><figcaption><a href="https://docs.oracle.com/en/database/oracle/oracle-database/21/jjucp/error-codes-reference.html#GUID-F75FBC01-C8D9-423E-93CC-B515F393E39A">Explore further</a></figcaption></figure><h3>Now what?</h3><p>So, what do we do with this information? Well, it depends. In this case, it looks like available connections were exhausted. And what could cause that? It’s a mystery, but it doesn’t have to be 😉. You need to do some exploring (It’s not just going to fix itself.)!</p><p>Luckily, there are many ways to “peek under the covers” to learn what is happening in and around your database. Some things that come to mind:</p><ul><li><a href="https://followthecoffee.com/ords-standalone-specifying-a-response-header-with-jetty-xml/">Access</a> and <a href="https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/24.4/orddg/troubleshooting-REST.html#GUID-4A0355F0-056D-4AA9-9B10-531E4E0EBDA6">debug</a> logging at the ORDS level</li><li><a href="https://docs.oracle.com/en-us/iaas/performance-hub/doc/awr-report-ui.html">AWR reports</a> from/in the database</li><li><a href="https://docs.oracle.com/en/database/oracle/oracle-database/23/refrn/V-SESSION.html">V$SESSION</a>, along with the other <a href="https://docs.oracle.com/en/database/oracle/oracle-database/23/refrn/dynamic-performance-views.html">Dynamic Performance Views</a> available in the Oracle database</li></ul><p>These are the ones that I’m most familiar. But if you are reading this, what works for you? Drop a comment on what tools you use, and I’ll update this post for others to see!</p><h3>When you’re ready…</h3><p>Once you’ve determined what is happening, you can return to ORDS and tweak your JDBC settings—if you need<strong><em> to</em></strong>!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Pt1hXlCVjGTzwIcn.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QCvayy1RDokmki66.png" /></figure><pre><strong>BIG DISCLAIMER:</strong> I wouldn&#39;t just set your Max connection settings to <br>some arbitrarily high number. That might work in the short term. <br>But until you can figure out what is actually happening across an <br>application&#39;s execution path, that approach is just a band-aid solution.</pre><h3>That’s all folks</h3><p>I’ve seen this error come up frequently in questions. And I think if more people knew what those numbers meant, it might help with self-diagnosis. I hope I’m not wrong.</p><p>I’ve seen this error come up frequently in questions. I think if more people knew what those numbers meant, it might help with self-diagnosis. I hope I’m not wrong. Catch you later 😎!</p><h3>Follow</h3><p>And don’t forget to follow, like, subscribe, share, taunt, troll, or stalk me!</p><ul><li><a href="https://followthecoffee.com/">Blog</a></li><li><a href="https://www.youtube.com/@chrishoina">YouTube</a></li><li><a href="https://www.linkedin.com/in/chrishoina/">LinkedIn</a></li><li><a href="https://www.instagram.com/chrishoina/">Instagram</a></li><li><a href="https://www.tiktok.com/@chrishoina">TikTok</a></li><li><a href="https://github.com/chrishoina">GitHub</a></li><li><a href="https://followthecoffee.com/setting-up-ssh-to-github-git-clone-into-your-oracle-cloud-linux-vm/">Mail</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24aaee36d004" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ORDS Standalone access logs: Jetty and customizing with XML]]></title>
            <link>https://blog.devgenius.io/ords-standalone-access-logs-jetty-and-customizing-with-xml-d7115c28525a?source=rss-887d963500db------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7115c28525a</guid>
            <category><![CDATA[oracle-rest-data-services]]></category>
            <category><![CDATA[oracle-database]]></category>
            <category><![CDATA[jetty]]></category>
            <category><![CDATA[documentation]]></category>
            <category><![CDATA[oracle]]></category>
            <dc:creator><![CDATA[Chris Hoina]]></dc:creator>
            <pubDate>Fri, 01 Nov 2024 13:29:55 GMT</pubDate>
            <atom:updated>2024-11-04T13:24:35.429Z</atom:updated>
            <content:encoded><![CDATA[<p>Did you know that you can <em>very quickly and easily</em> enable access logging when you are running ORDS in standalone mode (i.e., when using the embedded Jetty server)?</p><pre><strong>FYI:</strong> This article is an excerpt from a living document I&#39;ve been working <br>on dedicated to ORDS installation, configuration, and usage <br>(from the development/developer&#39;s perspective). <br><br>And in true &quot;me&quot; fashion, I&#39;ve sufficiently traveled down the rabbit hole <br>and back for your benefit! What you&#39;ll see below is a proposed update to <br>the related section of the current ORDS docs <br>(specifically, <a href="https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/24.3/ordig/miscellaneous-configuration-options-of-ORDS.html#ORDIG-GUID-A3798C5A-C6C6-40A2-826F-CE1CF0B8DDE2">5.2.3 Using Jetty XML Configuration</a>). Some of what you see <br>here might not make it to the official docs, however, I do think there is <br>some good background and references. In fact, some of the &quot;examples&quot; might <br>not make it either 😢.</pre><p><a href="https://www.oracle.com/database/sqldeveloper/technologies/db-actions/download/">Download ORDS</a> | <a href="https://forums.oracle.com/ords/apexds/domain/dev-community/category/oracle_rest_data_services">Oracle ORDS forum</a> | <a href="https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/">ORDS Docs</a> | <a href="https://www.youtube.com/playlist?list=PLM-LmJiml-RpTYzW3UkXHmOUEqXhea7-4">ORDS playlist</a></p><h4>Proposed/updated section</h4><pre><strong>NOTE:</strong> I intentionally made things redundant as possible. This way, when <br>you are scanning a discrete section you should hopefully have enough context <br>to accomplish what you want in as little time as possible.</pre><h4>5.2.3 Using Jetty XML Configuration Files</h4><p>This section describes how to configure the ORDS Jetty server (i.e., Standalone mode) for additional functionality using Jetty XML configuration files.</p><h4>Some background</h4><p>When ORDS is in Standalone mode (i.e., relying on the embedded Jetty server as its web server), ORDS can detect and “pick up” user-provided configuration settings found in the [ORDS configuration directory]/global/standalone/etc directory.</p><pre><strong>NOTE:</strong> You must create the [ORDS configuration directory]/global/standalone/etc <br>directory. The /etc directory is not part of a standard ORDS configuration.</pre><pre><strong>FYI:</strong> If you are familiar with Jetty, then just know that the <br>ORDS /etc. directory is analogous to the JETTY_BASE directory, <br>found in a standard Jetty deployment.[1]</pre><h4>5.2.3.1 Jetty Access Logs</h4><pre><strong>NOTE:</strong> Beginning with ORDS version 24.1, the standalone ORDS Access Log <br>format was updated to include additional format codes.[2]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4K35cEZ4_ostGLjjKEodbg.png" /><figcaption><em>Comparing ORDS access log formats pre- and post-version 24.1.</em></figcaption></figure><p>ORDS Standalone access logs will automatically be enabled once an access log location has been configured. You can enable Standalone logging by executing the following command:</p><pre>ords config set standalone.access.log [/Path to the access log location of your choosing]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SXR-uridWtoJXsGm.png" /></figure><p>After issuing this configuration command, the ORDS CLI will echo back the location. You can review your configuration settings by executing the ords config list --include-defaults command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6bYRzT6M2eJ8n-3i.png" /></figure><p>You will also see a new &lt;entry&gt;&lt;/entry&gt; has been saved to your /global/standalone/settings.xml file in your ORDS configuration folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rOVeSF-f8Lp6-kLr.png" /></figure><p>In most cases, the ORDS-provided Access Log data should be sufficient. However, should you choose to create <em>your own </em>custom access log, you may do so with Jetty XML files. [3]</p><h4>5.2.3.1.1 Jetty examples</h4><p>The behavior of the access log will differ depending on your configuration settings. Three possible scenarios for access logs are included.</p><pre><strong>NOTE:</strong> The inclusion of these XML files at runtime changes Jetty server <br>behavior and not ORDS behavior.</pre><h4>Scenario 1: a jetty-access-log.xml file IS included and standalone.access.log location <em>IS NOT</em> set</h4><p>In this first scenario, you do not need to “set” the standalone.access.log location. As can be seen in the below image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5ucBFDJXbae0faSz.png" /></figure><p><em>You will</em>, however, need to create an /etc directory in your ORDS configuration folder, similar to how you see below:</p><pre>[ORDS configuration directory]/global/standalone/etc</pre><p>An example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wAPXzKQVD0ywKGfc.png" /></figure><p>In the above image the /etc folder is nested under the /standalone folder, the /standalone folder is nested under the /global folder, and the /global folder is nested under the ORDS configuration folder (<em>your unique configuration folder name and absolute folder paths will differ</em>).</p><p>Place the following jetty-access-log.xm file into that /etc folder. [4]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-4XhY55cGKdDeZc1.png" /></figure><p>This jetty-access-log.xml file is comprised of the following properties:</p><pre>&lt;?xml version=&quot;1.0&quot;?&gt;<br>&lt;!DOCTYPE Configure PUBLIC &quot;-//Jetty//Configure//EN&quot; &quot;http://www.eclipse.org/jetty/configure.dtd&quot;&gt;<br>&lt;Configure id=&quot;Server&quot; class=&quot;org.eclipse.jetty.server.Server&quot;&gt;<br>    &lt;Ref id=&quot;Handlers&quot;&gt;<br>      &lt;Call name=&quot;addHandler&quot;&gt;<br>        &lt;Arg&gt;<br>          &lt;New id=&quot;RequestLog&quot; class=&quot;org.eclipse.jetty.server.handler.RequestLogHandler&quot;&gt;<br>            &lt;Set name=&quot;requestLog&quot;&gt;<br>              &lt;New id=&quot;RequestLogImpl&quot; class=&quot;org.eclipse.jetty.server.CustomRequestLog&quot;&gt;<br>                &lt;Arg&gt;/Users/choina/ords_access_logs/access.log&lt;/Arg&gt;<br>                &lt;Arg&gt;%{remote}a - %u %t &quot;%r&quot; %s %O &quot;%{Referer}i&quot; &quot;%{User-Agent}i&quot;&lt;/Arg&gt;<br>              &lt;/New&gt;<br>            &lt;/Set&gt;<br>          &lt;/New&gt;<br>        &lt;/Arg&gt;<br>      &lt;/Call&gt;<br>    &lt;/Ref&gt;<br>&lt;/Configure&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zDTxWs-pxvrx9Xo3.png" /><figcaption>Notice the &lt;Arg&gt; tags.</figcaption></figure><p>Pay special attention to the &lt;Arg&gt;&lt;/Arg&gt; tags. The first <em>&lt;Arg&gt;ument</em> informs Jetty where and how to save the access log file (i.e., save as access.log at the location indicated). The second argument specifies the format strings to include in the log file. For a detailed explanation of these format strings, see the <a href="#5231-jetty-access-logs">Jetty Access Logs</a> section of this document.</p><pre><strong>NOTE:</strong> The format strings used in this sample XML file were chosen arbitrarily.<br>You can include whatever relevant information, assuming it is available. <br><a href="https://javadoc.jetty.org/jetty-10/org/eclipse/jetty/server/CustomRequestLog.html">See here</a> for details.</pre><p>Once you have saved this file, you may then start ORDS normally (i.e., with the ords serve command). ORDS will then save and append Jetty (Standalone) access log information to the access.log file. You can later view the results and formatting of this log at the location you specified:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*syC2yH85VzbABmtt.png" /><figcaption>An example access log file.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0wv2tQrVhb_9Uyc_.png" /><figcaption>Reviewing the contents of the access log file.</figcaption></figure><pre><strong>NOTE:</strong> You can remove this file from your ORDS configuration prior to the <br>next time ORDS is started, and it will have no impact on your service.</pre><h4>Scenario 2: A jetty-access-log.xml file IS included and standalone.access.log location IS set</h4><p>In this scenario, you will have already completed the following two steps:</p><ol><li>Configured the standalone.access.log setting using the ORDS CLI, <em>and</em></li><li>You have included a jetty-access-log.xml file (or whatever file name of your choosing) in the /etc folder.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8J3wzUSdT3pgkRby.png" /><figcaption>Configuring standalone.access.log</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bS5s8DJHLuiJzGan.png" /><figcaption>Using the <strong>ords config list --include-defaults</strong> command.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FYHUSoE7CAu1PjLU.png" /></figure><p>You will also see a new &lt;entry&gt;&lt;/entry&gt; has been saved to your /global/standalone/settings.xml file in your ORDS configuration folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*p3VSeS4F_o742ukg.png" /></figure><p>After executing the ords serve command, you&#39;ll also see the standalone.access.log configuration setting included as ORDS initializes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CsIJQkSIAqsJs2QC.png" /></figure><p>You’ll also notice <em>two</em> versions of the access log files in the /[access log] folder location.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1AZSni2q2IL12PPq.png" /></figure><p>One file for the access.log, which was created from the jetty-access-log.xml file you included.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zs24Vw0Z7UB8RjZZ.png" /></figure><p>The other will be a log file with the format of: ords_[log file date].log.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4TEPRLU3ERsXOnny.png" /></figure><p>This second file (and subsequent log files saved <em>by date</em>), is the one that is automatically created for you as a result of setting the standalone.access.log property in your ORDS configuration. [5]</p><h4>Scenario 3: A jetty-access-log.xml file <em>IS NOT</em> included and standalone.access.log location <em>IS </em>set</h4><p>This is <em>effectively</em> the standard, typical way you would configure ORDS for Standalone access logging.</p><p>Set the standalone.access.log configuration setting with the following command:</p><pre>ords config set standalone.access.log [/Path to the access log location of your choosing]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pRZw5AuZ-7h6zavY.png" /></figure><pre><strong>NOTE:</strong> You will also see a new &lt;entry&gt;&lt;/entry&gt; has been saved to your <br>/global/standalone/settings.xml file in your ORDS configuration folder.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KC7y9hW7xhukrnXS.png" /></figure><p>Remove any [jetty].xml files from your /etc folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4RQZoVKzKzLKn3hD.png" /></figure><p>Once you start ORDS (i.e., ords serve) you&#39;ll find access logs in your access log folder. These and subsequent logs will be saved in the ords_[log file date].log format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MKeiPecyzc9h16ln.png" /></figure><p>And that’s it! You made it 😃.</p><h4>And some considerations</h4><p>The third scenario (the standard option) seems to be the most logical and convenient method for saving Standalone access logs, for a few reasons:</p><ul><li>No need to rely on XML files</li><li>Log files are conveniently saved with an intuitive naming convention, and</li><li>Log files are saved in a recognized format; making it easier for third-party logging analytics tools to ingest the data</li></ul><p>Footnotes are below. If you thought this was helpful, please share and comment! That’s all for now 😬.</p><h4>Follow</h4><p>And don’t forget to follow, like, subscribe, share, taunt, troll, or stalk me!</p><ul><li><a href="https://followthecoffee.com/">Blog</a></li><li><a href="https://twitter.com/chrishoina">Twitter</a></li><li><a href="https://www.youtube.com/@chrishoina">YouTube</a></li><li><a href="https://www.linkedin.com/in/chrishoina/">LinkedIn</a></li><li><a href="https://www.instagram.com/chrishoina/">Instagram</a></li><li><a href="https://www.tiktok.com/@chrishoina">TikTok</a></li><li><a href="https://github.com/chrishoina">GitHub</a></li><li><a href="https://followthecoffee.com/setting-up-ssh-to-github-git-clone-into-your-oracle-cloud-linux-vm/">Mail</a></li></ul><h4>Footnotes</h4><ol><li>It’s not crucial for you to have a deep understanding of how Jetty works. At a basic level, just know that there will always be a JETTY_BASE as well as a JETTY_HOME directory. And, in a standard Jetty installation, JETTY_BASE is where your modules and any customization live. While JETTY_HOME is where the Jetty binaries live. For the purposes of ORDS, the [ORDS configuration directory]/global/standalone/etc directory can be looked at as your JETTY_BASE. That is where you’ll place JETTY.XML files; similar to the ones you’ll see in this section’s examples. Again, none of this is important for you to know unless, of course, you’d like to learn more about Jetty.</li><li><a href="https://javadoc.io/doc/org.eclipse.jetty/jetty-server/10.0.24/org.eclipse.jetty.server/org/eclipse/jetty/server/CustomRequestLog.html">About Jetty Custom Request Log format codes and syntax</a></li><li>Jetty XML files can be viewed as a simpler way to add additional configuration settings to your Jetty server without having to create a custom Jetty Module. For a deeper dive into Jetty modules, how to configure them, and customizations <a href="https://jetty.org/docs/jetty/12/operations-guide/modules/index.html">see here</a>.</li><li>This file can be named [anything].xml. The format, contents, and arguments therein are what are important.</li><li>The ORDS-provided access logs, automatically save in the NCSA Common log format. Since other logging applications and tools may <em>expect</em> to ingest logs in this format, it might be worth considering whether or not you actually want to customize your own Jetty access logs. You can find details on the NCSA Common log format <a href="https://en.wikipedia.org/wiki/Common_Log_Format">here</a> or visit the <em>now-archived</em> <a href="https://web.archive.org/web/20081218093425/http://hoohoo.ncsa.uiuc.edu/docs/setup/httpd/Overview.html">HTTPd page</a> for more information on the creation of this format.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7115c28525a" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/ords-standalone-access-logs-jetty-and-customizing-with-xml-d7115c28525a">ORDS Standalone access logs: Jetty and customizing with XML</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ORDS 24.3 Release Highlights]]></title>
            <link>https://chrishoina.medium.com/ords-24-3-release-highlights-483abe7229c8?source=rss-887d963500db------2</link>
            <guid isPermaLink="false">https://medium.com/p/483abe7229c8</guid>
            <category><![CDATA[oracle-rest-data-services]]></category>
            <category><![CDATA[new-releases]]></category>
            <category><![CDATA[oracle-database-23ai]]></category>
            <category><![CDATA[ord]]></category>
            <category><![CDATA[oracle-cloud]]></category>
            <dc:creator><![CDATA[Chris Hoina]]></dc:creator>
            <pubDate>Wed, 02 Oct 2024 12:57:35 GMT</pubDate>
            <atom:updated>2024-10-11T14:51:26.950Z</atom:updated>
            <content:encoded><![CDATA[<h3>Overview</h3><p>There’s plenty to talk about in this release. However, I’m most excited about the performance improvements, ORDS sample applications, and documentation changes. Read on to get the whole story.</p><h3>Enhancements</h3><h4>API Performance</h4><blockquote><em>REST API responses from either AutoREST or customer based modules could see as much as a 30% improvement in response times.</em></blockquote><p>About a year ago, “we” introduced (we owe all our progress to Orla though) an internal program to track performance changes/improvements across ORDS APIs quantitatively. I can’t go into too much detail, but here is what I <em>can</em> divulge:</p><ul><li>Although we use K6 for our performance testing, we are not promoting its use over any other available performance testing solution. There are other great tools available (e.g., <a href="https://www.artillery.io/">Artillery</a>, <a href="https://jmeter.apache.org/">JMeter</a>, and, of course, <a href="https://k6.io/">k6</a>).</li><li>Testing is performed nightly against a 23ai database (installed in a PDB); we also include APEX in these tests.</li><li>For the tests, 250 schemas are created and then populated with various database objects (e.g., Functions, Materialized Views, PLSQL Packages, Sequences, Tables, Triggers, JSON Relational Duality Views, etc.)</li><li>These schemas are then absolutely <strong><em>hammered</em></strong> with Virtual Users. Users perform actions such as auto-REST enabling objects, creating custom Resource Modules, creating JSON Relational Duality Views, interrogating ORDS Metadata, and performing bulk inserts (BATCHLOAD) GETs, POSTs, etc.</li><li><em>These </em>metrics are what we use to track the ORDS quantitative metrics longitudinally.</li></ul><p>So, <em>that’s</em> what we mean by “performance improvements.” Pretty cool, eh?</p><pre><strong>NOTE:</strong> I don&#39;t know if that 30% average is mean or median. So, for all you <br>stat nerds, don&#39;t ask 🤣!</pre><h4>ORDS Sample applications</h4><p>We have not one but <strong><em>TWO</em></strong> sample ORDS applications for you 😍!</p><p><strong>Flask/Python</strong></p><p>The first is a fully contained LiveLabs sandbox workshop, which can be found <a href="https://livelabs.oracle.com/pls/apex/r/dbpm/livelabs/view-workshop?wid=3382">here</a>. But if you want to remix the code, check out my repo <a href="https://github.com/chrishoina/ocw24flask">here</a> (everything is heavily commented; hopefully, this will ease your pain).</p><p><strong>Node.js/React</strong></p><p>Secondly, our development team has created a brand new advanced application. Details are <a href="https://www.npmjs.com/package/@oracle/create-database-app">here</a>.</p><pre><strong>NOTE:</strong> We&#39;ll continue to iterate and improve on both, so please share with <br>us your feedback!</pre><h4>OAuth2.0 changes</h4><p>A consolidation and streamlining of the OAUTH and OAUTH_ADMIN PLSQL packages. The details:</p><p>We’ve consolidated those mentioned above into these two new packages:</p><ul><li>ORDS_SECURITY</li><li>ORDS_SECURITY_ADMIN</li></ul><p>The OAUTH and OAUTH_ADMIN PL/SQL Packages have been deprecated by royal decree. However, they&#39;ll still be included until ORDS version 25.3 (this time next year).</p><p>Creating a client and receiving your Client ID and Client Secret is now streamlined, and Client Secrets can now be rotated (by supporting two active Client Secrets while in rotation).</p><p>Locating the new PL/SQL Packages:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FTYRTXWjxodY&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DTYRTXWjxodY&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2FTYRTXWjxodY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e12f1f37e37681e60cc071b8c42270e9/href">https://medium.com/media/e12f1f37e37681e60cc071b8c42270e9/href</a></iframe><h4>23ai Boolean</h4><blockquote><em>ORDS now returns BOOLEAN types as JSON TRUE|FALSE properties instead of 0|1.</em></blockquote><p>What this looks like in practice with various configurations*:</p><p>*Thank you, internet stranger, for providing us with this <a href="https://stackoverflow.com/questions/1465405/how-to-use-boolean-type-in-select-statement">juicy bit of code</a>.</p><p><strong>Oracle Database 23ai + ORDS 24.3</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lj6lQgTmzlyVhe7K.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uPM8Y93CMhthkRYE.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i3xSucNfrSS2qAZp6MApPA.png" /></figure><p><strong>Oracle Database 23ai + ORDS 24.2</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*q5Tx9IRuDyVSzOz3.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Jz84WxovK50hHyPB.png" /></figure><p><strong>Oracle DB 21c Enterprise Edition + ORDS 24.3</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iuMUpVicGjQjhcay.png" /><figcaption>Doesn’t work…Red Herring.</figcaption></figure><h4>Mong[ooohhh, no, you didn’t?!] DB API</h4><p>Support for <em>even more</em> Database Administration commands:</p><ul><li>listIndexes</li><li>dropIndexes, and</li><li>optional parameter expireAfterSeconds (which applies to the createIndexes command)</li></ul><p>The following MongoDB Aggregation Stages are now supported:</p><ul><li>$external</li><li>$lookup</li><li>$sample, and</li><li>$lookup (see <a href="https://docs.oracle.com/en/database/oracle/mongodb-api/mgapi/overview-oracle-database-api-mongodb.html">docs for details</a>)</li></ul><p>Users may now specify a JSON Schema validator when creating a collection.</p><p>You may now create MongoDB API connections <em>without</em> TLS connections (Oracle Database 19c and later) can now be made.</p><p>Users can now set the createIndexes’ “online” option to TRUE to allow DML operations at index creation time.</p><pre><strong>To-Do:</strong> More details will come from the MongoDB API team as they publish new <br>content.</pre><p>In the meantime, here are some resources I found:</p><ul><li><a href="https://juliandontcheff.wordpress.com/2024/08/15/the-oracle-database-api-for-mongodb-in-oracle-database-23ai/">MongoDB API article from Julian</a></li><li><a href="https://medium.com/oracledevs/object-storage-document-access-in-mongodb-no-problem-with-the-oracle-mongodb-api-c6091ba6b7f8">Medium arti</a><a href="https://medium.com/oracledevs/object-storage-document-access-in-mongodb-no-problem-with-the-oracle-mongodb-api-c6091ba6b7f8">c</a><a href="https://medium.com/oracledevs/object-storage-document-access-in-mongodb-no-problem-with-the-oracle-mongodb-api-c6091ba6b7f8">le from Hermann</a></li><li>Oracle blogs from Hermann:</li><li><a href="https://blogs.oracle.com/database/post/proper-sql-comes-to-mongodb-applications-with-oracle">Article one</a></li><li><a href="https://blogs.oracle.com/datawarehousing/post/how-to-configure-mongo-api-for-adb-with-pe">Article two</a></li></ul><h4><strong>UPDATE: MongoDB API update article (October 10, 2024)</strong></h4><p>A brand new article about the latest MongoDB API updates just dropped! Thanks to Hermann for publishing and sharing the latest. Details are <a href="https://medium.com/oracledevs/whenever-you-think-things-cannot-be-better-with-the-oracle-mongodb-api-195a928f9119">here</a>.</p><h3>Documentation</h3><p>Introduced the following new sections:</p><p><em>6.2.4 Using OCI Monitoring Service with Oracle REST Data Services</em></p><ul><li>This new section details the configuration of the recently added ords-metrics utility. You can find details on how to set up this monitoring service (to communicate with OCI) <a href="https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/24.3/ordig/deploying-and-monitoring-oracle-rest-data-services.html#GUID-6470993D-B904-46B8-ABAB-DFAF8CF7F258">here</a>.</li></ul><p><em>3.2 Deploying ORDS with Central Configuration Server</em></p><ul><li>Officially introduced documentation for deploying ORDS using a central configuration server (<a href="https://followthecoffee.com/ords-24-2-release-highlights/#central-configuration">introduced in the last release notes blog</a>). Docs <a href="https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/24.3/ordig/configuring-additional-databases.html#GUID-EE4EEDBF-321F-45F1-BFEE-A9318C4F5CEF">here</a>.</li></ul><p><em>Appendix D ORDS Central Configuration OpenAPI</em></p><ul><li>Along with the updated docs, we’ve included the OpenAPI spec for creating the endpoints required for a central configuration server (and a special video clip of me retrieving the PL/SQL definitions and the OpenAPI spec <a href="https://youtu.be/xciVQog7nrM?si=g-Pw8KVai3FF7_7A&amp;t=829">in Database Actions</a>).</li><li>OpenAPI spec doc <a href="https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/24.3/ordig/ords-central-configuration-openapi.html">here</a>.</li></ul><h3>Java notes</h3><p>In our Release Notes, we claim support for the following JDKs:</p><ul><li>Oracle Java 11, 17, or 21</li><li>Oracle GraalVM Enterprise Edition for Java 11</li><li>Oracle GraalVM Enterprise Edition for Java 17</li><li>Oracle GraalVM Enterprise Edition for Java 21</li></ul><p><em>However</em>, this may be confusing regarding Oracle GraalVM Enterprise Editions. You should know that there are currently <strong><em>TWO</em></strong> <a href="https://www.oracle.com/downloads/graalvm-downloads.html">Oracle GraalVM Enterprise Edition JDKs</a>:</p><ul><li>Oracle GraalVM Enterprise Edition 20</li><li>Oracle GraalVM Enterprise Edition 21</li></ul><p>Instead of how we’ve presented, here is another, cleaner presentation of these JDKs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4ZUIDquxJgXw2r-gP0cpIg.png" /><figcaption>Oracle GraalVM Enterprise Edition <em>details</em></figcaption></figure><p>So when you are choosing your JDK (to use with ORDS), make sure you consider your platform and use cases. Details on using GraalVM with ORDS <a href="https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/24.3/ordig/installing-REST-data-services.html#GUID-DAF1FD0D-0062-4C4D-B481-A9209AB89799">here</a>.</p><h3>fin</h3><p>This concludes the release notes supplement.</p><p>This space ⬇️ left intentionally blank.</p><h3>Follow</h3><p>And don’t forget to follow, like, subscribe, share, taunt, troll, or stalk me!</p><ul><li><a href="https://followthecoffee.com/">Blog</a></li><li><a href="https://twitter.com/chrishoina">Twitter</a></li><li><a href="https://www.youtube.com/@chrishoina">YouTube</a></li><li><a href="https://www.linkedin.com/in/chrishoina/">LinkedIn</a></li><li><a href="https://www.instagram.com/chrishoina/">Instagram</a></li><li><a href="https://www.tiktok.com/@chrishoina">TikTok</a></li><li><a href="https://github.com/chrishoina">GitHub</a></li><li><a href="https://followthecoffee.com/setting-up-ssh-to-github-git-clone-into-your-oracle-cloud-linux-vm/">Mail</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=483abe7229c8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>