Running Oracle GoldenGate in containers and discovering that your carefully configured Microsoft Entra ID authentication still refuses to work? No fear. I may have a solution for you. Or, more accurately, I have something that worked in my lab, because I would rather not become the villain of a future story that starts with “I copied this from a blog and deployed it directly into production…” please don’t do that!

While working on my previous article, Oracle GoldenGate and Microsoft Entra ID: Configuring External Authentication and Authorization, I spent quite a bit of time getting the Microsoft Entra ID side of the integration working.

Eventually, everything started falling into place. OpenID discovery worked. JWK retrieval worked. Client Credentials token requests worked. Microsoft Graph queries worked. In my tests, Application.Read.All was enough instead of Application.ReadWrite.All, although admin consent was still required. The Entra ID side was clearly responding correctly, but the GoldenGate Authorization Profile validation still failed.

At that point, I thought the difficult part was over.

GoldenGate in containers…had other plans.

The Error that started the investigation

When I tried to use the external authentication configuration, GoldenGate reported:

Test Passed:
False
Connection test failed for authorization profile 'entraID' in deployment 'ServiceManager'
Details
tokenGetPossible:
True
tenantUriValidOpenIdDiscoveryDocs:
True
tenantUriReachable:
True
incorrectProfileInformation:
Messages
Severity:
INFO
Title:
Failed the connection and configuration test for profile 'entraID'. Bearer authorization is not enabled in all the services in the deployment 'ServiceManager'.
Cause:
Not all enabled services in the mentioned deployment have ''Bearer'' authorization enabled under ''authorizationDetails/common/allow''.
Action:
Add ''Bearer'' authorization under ''authorizationDetails/common/allow'' for all enabled services in the deployment and try again.

Summary:

Bearer authorization is not enabled in all the services in the deployment.

This was the point where I started wondering whether I was looking in the wrong place. I had spent most of my time checking Entra ID, permissions, tokens, and Microsoft Graph, but the report was telling me that GoldenGate could actually reach everything it needed. Still, the overall Authorization Profile test was failing.

The error was pointing somewhere else: the GoldenGate services themselves.

Checking what the GoldenGate Services actually allow

GoldenGate exposes the configuration of the individual deployment services through its REST API. For example, for my OGGENTRA deployment I queried the Administration Server:

GET /services/v2/deployments/OGGENTRA/services/adminsrvr

The part of the response I was interested in was:

.response.config.authorizationDetails.common.allow

And this is what I found:

[
"Digest-SHA-256",
"Digest",
"Basic"
]

No Bearer.

Well, that looked suspicious.

I repeated the check for adminsrvr, distsrvr, recvsrvr, and pmsrvr. They all had the same configuration.

This explained the GoldenGate error. The Entra ID connectivity checks could succeed, but the overall Authorization Profile validation still failed because the deployment services were not configured to accept Bearer authentication.

Authorization Profile validation and Bearer Authentication are two different checks

This is where things started to make more sense.

GoldenGate needs an Authorization Profile that describes how it interacts with the external Identity Provider. But the GoldenGate services also need to accept the authentication mechanism used by the client.

Those two things are related, but they are not the same configuration.

Microsoft Entra ID
|
| OpenID / JWK / Token / Graph
| OK
v
GoldenGate Authorization Profile
|
| Connectivity checks
| OK
|
| Full validation
| FAILED
v
GoldenGate services
|
+-- Bearer missing from authorizationDetails.common.allow

At this point, changing another Entra ID permission or generating another secret was unlikely to get me anywhere. The token flow was working. I needed to look at the GoldenGate side instead.

A small script to validate the allowed authentication modes

After checking the services manually a few times, I wanted something that anyone could copy into a lab and run before going too far down the OAuth troubleshooting rabbit hole.

The following Bash script uses curl and jq to query Service Manager and each deployment service, print the configured authentication modes, and tell you whether Bearer is present.

Shell
#!/usr/bin/env bash
# GoldenGate URL, for example:
# https://ogg-lab.example.com
OGG_URL="${OGG_URL:-https://ogg-lab.example.com}"
OGG_DEPLOYMENT="${OGG_DEPLOYMENT:-OGGENTRA}"
OGG_USER="${OGG_USER:-oggadmin}"
if ! command -v jq >/dev/null 2>&1; then
echo "ERROR: jq is required."
exit 1
fi
read -rsp "GoldenGate password: " OGG_PASSWORD
echo
check_service() {
local deployment="$1"
local service="$2"
local url="${OGG_URL}/services/v2/deployments/${deployment}/services/${service}"
echo
echo "Checking ${deployment}/${service}"
response=$(curl -sS --fail \
--digest \
-u "${OGG_USER}:${OGG_PASSWORD}" \
-H "Accept: application/json" \
"${url}") || {
echo " ERROR: Could not query ${url}"
return 1
}
auth_modes=$(echo "${response}" | jq -r \
'.response.config.authorizationDetails.common.allow[]?')
if [[ -z "${auth_modes}" ]]; then
echo " No authentication modes found in the response."
return 1
fi
echo " Allowed authentication modes:"
echo "${auth_modes}" | sed 's/^/ - /'
if echo "${auth_modes}" | grep -Fxq "Bearer"; then
echo " RESULT: Bearer is ENABLED"
else
echo " RESULT: Bearer is NOT enabled"
fi
}
# Service Manager
check_service "ServiceManager" "ServiceManager"
# Deployment services
for service in adminsrvr distsrvr recvsrvr pmsrvr; do
check_service "${OGG_DEPLOYMENT}" "${service}"
done

You can run it by setting the URL and deployment name for your environment:

export OGG_URL="https://ogg-lab.example.com"
export OGG_DEPLOYMENT="OGGENTRA"
export OGG_USER="oggadmin"
./check-bearer-auth.sh

For the configuration that triggered the problem, the important result would look something like this:

Checking OGGENTRA/adminsrvr
Allowed authentication modes:
- Digest-SHA-256
- Digest
- Basic
RESULT: Bearer is NOT enabled

After creating the environment with Bearer included, the same test should show:

Checking OGGENTRA/adminsrvr
Allowed authentication modes:
- Digest-SHA-256
- Digest
- Basic
- Bearer
RESULT: Bearer is ENABLED
....

Service Manager and Deployment Services deserve separate attention

One thing initially confused me: the test report mentioned ServiceManager, while most of the service checks I was doing were against my OGGENTRA deployment. The reason is that I created and tested the Authorization Profile from Service Manager. The error, however, was not telling me that Entra ID was unreachable. It was telling me that Bearer authentication was not enabled across the GoldenGate services that needed to accept it. That is why I checked both Service Manager and the individual services inside OGGENTRA deployment.

The error itself is quite specific:

Bearer authorization is not enabled in all the services in the deployment.

The important words are all the services in the deployment.

So when troubleshooting this, I would not stop after checking Service Manager. Validate Service Manager, but also query the configuration of Administration Server, Distribution Server, Receiver Server, and Performance Metrics Server individually.

So where was this configuration coming from?

My lab was using Oracle’s official GoldenGate container image, so the next question was obvious: where were those authentication modes coming from?

That took me into Oracle’s official Docker images repository and, more specifically, the GoldenGate build and initialization scripts. The file that caught my attention was deployment-init.py.

In other words, I was no longer looking only at what GoldenGate reported at runtime. I could now compare that behavior with the code used to create the environment in the first place.

This script is particularly interesting because it builds the command used to create both Service Manager and the GoldenGate deployment.

In the original logic I was testing, the authentication modes were effectively created as:

Digest-SHA-256,Digest,Basic

That lined up with what I had observed through the REST API: the deployment was being created with Digest and Basic authentication modes, but not Bearer. Seeing the same thing in the initialization code gave me a much better lead than continuing to tweak the Entra ID configuration.

At this point the behavior was no longer mysterious. The services were not randomly losing Bearer authentication later. They were being created without it.

Building the deployment with Bearer enabled

For my lab, I created my own copy of the GoldenGate Docker build repository and modified the deployment initialization so that Bearer is enabled when the environment is created. This was not my first time building my own GoldenGate container image. I had already gone down that road because there is currently no straightforward support for building Oracle GoldenGate container images with one-off patches, something I covered in Oracle GoldenGate Containers and One-Off Patches: The Missing Piece.

The change is intentionally small. In establish_service_manager(), I changed the authentication modes to:

option('authModes', 'Digest-SHA-256,Digest,Basic,Bearer')

And I made the same change in create_ogg_deployment():

option('authModes', 'Digest-SHA-256,Digest,Basic,Bearer')

You can see the modified deployment-init.py in my GoldenGate Docker images repository:

Oracle-GoldenGate-docker-images: deployment-init.py

I then built my own GoldenGate image from that repository and created a new environment so the authentication modes were applied during deployment creation rather than patched manually afterwards.

For me, that was also a cleaner test. I wanted to verify whether the same Entra ID configuration worked when the GoldenGate services were created with Bearer authentication enabled from the beginning.

A note about support and product behavior

I also contacted Oracle Product Management because I wanted to understand whether the behavior of the official container image is intentional, a current limitation, or simply a gap in how the container initialization creates the deployments. At the time of writing, I’m still waiting for their feedback. If I learn anything that changes or clarifies the behavior described here, I’ll update this article.

That distinction matters.

A quick but important disclaimer: everything shown here was tested in my own lab. The modified repository I am sharing is an example of how I investigated and reproduced the behavior. It is not an Oracle-supported fix, patch, or production recommendation. If you use or adapt the code, make sure you understand the changes and test them properly in your own environment. I cannot take responsibility for issues resulting from using my modified repository. For production, keep it safe: follow your normal change and validation processes and, when in doubt, check with Oracle Support.

What I can say from the testing is much simpler:

  • The Entra ID connectivity checks inside the Authorization Profile test succeeded, but the overall profile validation failed because Bearer was not enabled in all GoldenGate services.
  • GoldenGate reported that Bearer authorization was not enabled for all deployment services.
  • The REST configuration of the deployment services did not contain Bearer.
  • The container deployment initialization explicitly defined the authentication modes without Bearer.
  • Creating my own image with Bearer included in authModes allowed me to test the deployment with the required authentication mode enabled from the start.

What I would check first next time

If I hit this error again, I would not start by changing permissions in Entra ID. My order of operations would be:

  1. Validate the Authorization Profile.
  2. Query authorizationDetails.common.allow for Service Manager.
  3. Query the same configuration for adminsrvr, distsrvr, recvsrvr, and pmsrvr.
  4. Confirm that Bearer is present everywhere it is required.
  5. If you are using a container-created deployment, understand how that deployment was initialized before assuming the problem is in OAuth or Entra ID.

The small validation script above makes steps 2 through 4 particularly easy.

Final Thoughts

This started as a Microsoft Entra ID test.

It somehow ended with me querying GoldenGate REST APIs, following container initialization code, modifying deployment creation logic, and building my own GoldenGate image.

Which, to be fair, is fairly representative of how my labs normally go.

Looking back, my mistake at the beginning was treating external authentication as one big black box. It isn’t. Entra ID can be reachable, OpenID discovery can work, GoldenGate can obtain a token, and the GoldenGate services can still reject that authentication method.

That is the part worth remembering when troubleshooting this kind of integration: a successful token flow does not automatically mean every GoldenGate service is ready to accept that token.

Sometimes the missing piece really is just one word:

Bearer

The fun part is finding out why it was missing in the first place.

Leave a Reply

Trending