[Bug] Token is not updated if a function is updated
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Read release policy
- [X] I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.
### Version
Pulsar 3.2.3 in a kubernetes env (v1.29.6)
### Minimal reproduce step
Create a GO function using a TOKEN_A
`/bin/pulsar-admin \
--admin-url $ADMIN_URL \
--auth-params TOKEN_A\
--auth-plugin org.apache.pulsar.client.impl.auth.AuthenticationToken \
functions create \
--function-config-file $CONFIG_FILE \
--go $BIN_PATH \
--name $FUNCTION_NAME \
--parallelism $PARALLELISM \
--cpu $CPU \
--ram $RAM \
--user-config "$USER_CONFIG_JSON"`
The function is created and the TOKEN_A is placed under /etc/auth/token
Update the function using TOKEN_B
`/bin/pulsar-admin \
--admin-url $ADMIN_URL \
--auth-params TOKEN_B\
--auth-plugin org.apache.pulsar.client.impl.auth.AuthenticationToken \
functions update \
--function-config-file $CONFIG_FILE \
--go $BIN_PATH \
--name $FUNCTION_NAME \
--parallelism $PARALLELISM \
--cpu $CPU \
--ram $RAM \
--user-config "$USER_CONFIG_JSON"`
### What did you expect to see?
The function is updated and the TOKEN_B is placed under /etc/auth/token
### What did you see instead?
The function is updated and the TOKEN_A is placed under /etc/auth/token
### Anything else?
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
Research direction
Reproduce the issue with the Pulsar 3.2.3 pulsar-admin functions create and functions update commands in the reported Kubernetes environment, changing TOKEN_A to TOKEN_B. Inspect how the update command handles authentication credentials and how the function runtime populates /etc/auth/token; done means the updated function uses TOKEN_B rather than TOKEN_A.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, java, kubernetes
- Domain
- authentication, backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100