Skip to content

Debug log in ConvertIdentityStoreGroupToAWSGroup prints pointer addresses instead of values #335

Description

@waseem-uddin

Describe the bug

ConvertIdentityStoreGroupToAWSGroup (internal/sync.go) logs the group id and display name as *string pointers, so the debug line prints memory addresses instead of the values:

log.WithField("groupId", group.GroupId).WithField("displayName", group.DisplayName).Debug("ConvertIdentityStoreGroupToAWSGroup() Group converted")

group.GroupId and group.DisplayName are *string, so the emitted line looks like:

level=debug msg="ConvertIdentityStoreGroupToAWSGroup() Group converted" displayName=0x1400010f810 groupId=0x1400010f7f0

To Reproduce
Steps to reproduce the behavior:

  1. Run ssosync with --debug against IAM Identity Center (any sync method that lists groups).
  2. Look at the ConvertIdentityStoreGroupToAWSGroup() Group converted debug lines.
  3. displayName and groupId show pointer addresses (0x...) rather than the group name / id.

Expected behavior

The debug line shows the actual values, e.g. displayName=engineering groupId=9067...-..., which is what makes the debug output useful when tracing group conversion.

Additional context

Version: v2.6.1 (also current master). Both fields are nil-checked immediately above the log call, so dereferencing them (*group.GroupId, *group.DisplayName) is safe. I'll open a PR with the one-line fix.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions