Skip to content

After calling /updateSk the gateway does not take effect #6433

Description

@KANLON

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

method is AppAuthServiceImpl#updateAppSecretByAppKey 、 AppAuthController#updateSk

Updating the app secret via updateSk does not propagate the change to the gateway immediately, so the gateway continues to use the old secret for signature verification until a manual sync is triggered.

AppAuthServiceImpl#updateAppSecretByAppKey need modify , i will push a pr later

        int count = appAuthMapper.updateAppSecretByAppKey(appKey, appSecret);
        if (count > 0) {
            AppAuthDO appAuthDO = appAuthMapper.findByAppKey(appKey);
            if (Objects.nonNull(appAuthDO)) {
                AppAuthData appAuthData = buildByEntity(appAuthDO);
                eventPublisher.publishEvent(new DataChangedEvent(ConfigGroupEnum.APP_AUTH,
                        DataEventTypeEnum.UPDATE,
                        Lists.newArrayList(appAuthData)));
            }
        }
        return ShenyuAdminResult.success(count);

Expected Behavior

After calling /updateSk the gateway take effect

Steps To Reproduce

No response

Environment

ShenYu version(s):2.7.2-SNAPSHOT

Debug logs

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions