Skip to content

fix: publish a connection password without a username - #1934

Open
ranjithguggilla wants to merge 1 commit into
tableau:developmentfrom
ranjithguggilla:fix/1926-credential-password-without-name
Open

ranjithguggilla wants to merge 1 commit into
tableau:developmentfrom
ranjithguggilla:fix/1926-credential-password-without-name

Conversation

@ranjithguggilla

Copy link
Copy Markdown

Closes #1926

Motivation

Publishing a workbook with a connection password and no username is rejected by TSC, even though the REST API accepts connectionCredentials with a password and no name. Tested on Tableau Server (REST 3.31), that request keeps the username already stored on the connection and embeds the password. tabcmd Classic does this with --db-password and no --db-username; tabcmd 2 uses TSC and drops the password.

Behavior change

ConnectionCredentials.name may be None. The request then omits the name attribute. A missing password still raises ValueError. An empty string is still sent as name="".

A ConnectionItem with a password and embed_password, and no username, is sent the same way.

Test plan

test_publish_connection_password_without_a_name checks a ConnectionCredentials with no name, a ConnectionItem with only a password, and an empty-string name. test_publish_connection_credentials_require_a_password checks the missing-password error. The existing named-credential publish tests still pass.

Not covered: a publish against Tableau Server.

Tableau Server accepts connectionCredentials that carry a password and
no name, and then keeps the username already stored on the connection.
TSC refused that request, so a password-only publish never embedded the
password.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish: allow a connection credential with a password and no name

1 participant