Skip to content

Instantly share code, notes, and snippets.

@alopresto
Created June 19, 2019 03:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alopresto/7ff3d455913e4f4fc4a930074158278e to your computer and use it in GitHub Desktop.
Save alopresto/7ff3d455913e4f4fc4a930074158278e to your computer and use it in GitHub Desktop.
🔓 16s @ 20:33:44 $ cat logs/nifi-user.log
2019-06-18 19:06:15,032 INFO [main] o.a.n.a.FileUserGroupProvider Creating new users file at /Users/alopresto/Workspace/nifi/nifi-assembly/target/nifi-1.10.0-SNAPSHOT-bin/nifi-1.10.0-SNAPSHOT/./conf/users.xml
2019-06-18 19:06:15,040 DEBUG [main] o.a.n.a.util.IdentityMappingUtil Identity Mapping property nifi.security.identity.mapping.pattern.dn was found, but no transform was present. Using NONE.
2019-06-18 19:06:15,042 DEBUG [main] o.a.n.a.util.IdentityMappingUtil Found Identity Mapping with key = dn, pattern = (?i)^CN=([^,]*),.*$, value = $1, transform = NONE
2019-06-18 19:06:15,046 INFO [main] o.a.n.a.FileUserGroupProvider Users/Groups file loaded at Tue Jun 18 19:06:15 PDT 2019
2019-06-18 19:06:15,048 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, which dscl]
2019-06-18 19:06:15,067 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command 'Get Users List': [sh, -c, dscl . -readall /Users UniqueID PrimaryGroupID | awk 'BEGIN { OFS = ":"; ORS="\n"; i=0;} /RecordName: / {name = $2;i = 0;}/PrimaryGroupID: / {gid = $2;} /^ / {if (i == 0) { i++; name = $1;}} /UniqueID: / {uid = $2;print name, uid, gid;}' | grep -v ^_]
2019-06-18 19:06:15,149 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command 'Get Groups List': [sh, -c, dscl . -list /Groups PrimaryGroupID | grep -v '^_' | sed 's/ \{1,\}/:/g']
2019-06-18 19:06:15,220 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/accessibility GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:15,262 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/admin GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:15,302 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/authedusers GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:15,342 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/bin GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:15,383 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/certusers GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:15,423 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/cloakproxy GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:15,463 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/com.apple.access_disabled GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:15,502 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/com.apple.access_ftp GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:15,542 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/com.apple.access_screensharing GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:15,580 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/com.apple.access_sessionkey GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:15,620 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/com.apple.access_ssh GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:15,659 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/com.apple.sharepoint.group.1 GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:15,698 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/com.apple.sharepoint.group.2 GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:15,737 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/consoleusers GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:15,777 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/daemon GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:15,816 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/dialer GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:15,856 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/everyone GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:15,896 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/group GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:15,936 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/interactusers GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:15,975 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/kmem GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:16,014 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/localaccounts GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:16,054 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/mail GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:16,093 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/netaccounts GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:16,132 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/netusers GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:16,172 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/network GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:16,214 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/nobody GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:16,254 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/nogroup GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:16,294 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/operator GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:16,335 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/owner GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:16,375 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/procmod GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:16,416 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/procview GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:16,456 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/staff GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:16,496 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/sys GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:16,535 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/tty GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:16,574 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/utmp GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:16,614 DEBUG [main] o.a.nifi.authorization.util.ShellRunner Run Command '<unknown>': [sh, -c, dscl . -read /Groups/wheel GroupMembership | cut -f 2- -d ' ' | sed 's/\ /,/g']
2019-06-18 19:06:16,661 INFO [main] o.a.n.a.FileAccessPolicyProvider Creating new authorizations file at /Users/alopresto/Workspace/nifi/nifi-assembly/target/nifi-1.10.0-SNAPSHOT-bin/nifi-1.10.0-SNAPSHOT/./conf/authorizations.xml
2019-06-18 19:06:16,663 DEBUG [main] o.a.n.a.util.IdentityMappingUtil Identity Mapping property nifi.security.identity.mapping.pattern.dn was found, but no transform was present. Using NONE.
2019-06-18 19:06:16,663 DEBUG [main] o.a.n.a.util.IdentityMappingUtil Found Identity Mapping with key = dn, pattern = (?i)^CN=([^,]*),.*$, value = $1, transform = NONE
2019-06-18 19:06:16,675 WARN [main] org.apache.nifi.authorization.FlowParser Flow Configuration does not exist or was empty
2019-06-18 19:06:16,675 INFO [main] o.a.n.a.FileAccessPolicyProvider Populating authorizations for Initial Admin: alopresto
2019-06-18 19:06:16,681 INFO [main] o.a.n.a.FileAccessPolicyProvider Authorizations file loaded at Tue Jun 18 19:06:16 PDT 2019
2019-06-18 19:06:16,691 DEBUG [main] o.a.n.a.util.IdentityMappingUtil Identity Mapping property nifi.security.identity.mapping.pattern.dn was found, but no transform was present. Using NONE.
2019-06-18 19:06:16,691 DEBUG [main] o.a.n.a.util.IdentityMappingUtil Found Identity Mapping with key = dn, pattern = (?i)^CN=([^,]*),.*$, value = $1, transform = NONE
2019-06-18 19:06:16,729 DEBUG [main] o.a.n.a.util.IdentityMappingUtil Identity Mapping property nifi.security.identity.mapping.pattern.dn was found, but no transform was present. Using NONE.
2019-06-18 19:06:16,729 DEBUG [main] o.a.n.a.util.IdentityMappingUtil Found Identity Mapping with key = dn, pattern = (?i)^CN=([^,]*),.*$, value = $1, transform = NONE
2019-06-18 19:06:16,744 DEBUG [main] o.a.n.a.util.IdentityMappingUtil Identity Mapping property nifi.security.identity.mapping.pattern.dn was found, but no transform was present. Using NONE.
2019-06-18 19:06:16,744 DEBUG [main] o.a.n.a.util.IdentityMappingUtil Found Identity Mapping with key = dn, pattern = (?i)^CN=([^,]*),.*$, value = $1, transform = NONE
2019-06-18 19:06:16,790 DEBUG [main] o.a.n.a.util.IdentityMappingUtil Identity Mapping property nifi.security.identity.mapping.pattern.dn was found, but no transform was present. Using NONE.
2019-06-18 19:06:16,790 DEBUG [main] o.a.n.a.util.IdentityMappingUtil Found Identity Mapping with key = dn, pattern = (?i)^CN=([^,]*),.*$, value = $1, transform = NONE
2019-06-18 19:06:58,710 DEBUG [NiFi Web Server-32] o.a.nifi.authorization.util.ShellRunner Run Command 'Get Single User by Id': [sh, -c, id -P alopresto | cut -f 1,3,4 -d ':']
2019-06-18 19:06:59,353 INFO [NiFi Web Server-27] o.a.n.w.s.NiFiAuthenticationFilter Attempting request for (<JWT token>) GET https://andy.nifi:9443/nifi-api/flow/current-user (source ip: 127.0.0.1)
2019-06-18 19:06:59,354 DEBUG [NiFi Web Server-27] o.a.nifi.authorization.util.ShellRunner Run Command 'Get Single User by Id': [sh, -c, id -P alopresto | cut -f 1,3,4 -d ':']
2019-06-18 19:06:59,376 INFO [NiFi Web Server-27] o.a.n.w.s.NiFiAuthenticationFilter Authentication success for alopresto
2019-06-18 19:06:59,450 DEBUG [NiFi Web Server-27] o.a.nifi.authorization.util.ShellRunner Run Command 'Get Single User by Id': [sh, -c, id -P alopresto | cut -f 1,3,4 -d ':']
2019-06-18 19:06:59,477 INFO [NiFi Web Server-27] o.a.n.w.a.c.AccessDeniedExceptionMapper identity[alopresto], groups[] does not have permission to access the requested resource. Unknown user with identity 'alopresto'. Returning Forbidden response.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment