Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,7 @@ private ClientIdentity getSecretIdentity( @Nonnull final String clientid )
@Nonnull
CredentialType getCredentialType()
{
return getOAuthCredential(CredentialType.class, "credential-type")
.onEmpty(
() -> log
.warn(
"Credential type not found or not recognised in service binding. Defaulting to BINDING_SECRET."))
.getOrElse(CredentialType.BINDING_SECRET);
return getOAuthCredential(CredentialType.class, "credential-type").getOrElse(CredentialType.BINDING_SECRET);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Major)
Can we keep the message? It sounds important to me.
Also shouldn't the AI Core credential actually contain "credential-type"? How is this warn message harming anyone (legitimally)?

Copy link
Member

@Jonas-Isr Jonas-Isr Oct 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be ideal to have this message once (i.e., the first time this code is invoked) but not with each and every call because then it really clogs up the logs.

We are trying to fix the problem we saw in the demo in the AI SDK.

Copy link
Contributor

@newtork newtork Oct 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the protocol, we've found the service-key may or may not contain credential-type in the JSON payload.

But for normal use-cases for classic service-bindings, we want to see WARN messages when important fields are mising.

}

/**
Expand Down