Skip to content

all: Update auth module plugin with expected auth message list and add retry fail catch - #63

Merged
marcelmamula merged 2 commits into
sap-linuxlab:devfrom
marcelmamula:error-401
May 26, 2026
Merged

all: Update auth module plugin with expected auth message list and add retry fail catch#63
marcelmamula merged 2 commits into
sap-linuxlab:devfrom
marcelmamula:error-401

Conversation

@marcelmamula

@marcelmamula marcelmamula commented May 22, 2026

Copy link
Copy Markdown
Contributor

Changes

Resolves issues reported in #62

  • Add list of potential messages indicating that this is authentication issue in ansible modules.
        auth_error_messages = [
            'could not authenticate you',
            "couldn't authenticate you",
            'authentication failed',
            'invalid credentials',
            'incorrect username or password'
        ]
  • Add retry counter that will check if retry happened on same endpoint and fail after 3 attempts. This solves issue when authentication message list does not contain auth error.
    msg: Authentication failed due to invalid credentials. Please verify your S-User ID
        and password are correct. If this error persists with valid credentials, the authentication
        error format may have changed.

Tests

Tested on SLES_SAP 16.0 using valid and invalid credentials.

@marcelmamula marcelmamula self-assigned this May 22, 2026
@marcelmamula marcelmamula added the bug Something isn't working label May 22, 2026
@marcelmamula
marcelmamula merged commit 091dae3 into sap-linuxlab:dev May 26, 2026
16 checks passed
@marcelmamula
marcelmamula deleted the error-401 branch June 10, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant