GithubHelp home page GithubHelp logo

临时关闭nacos鉴权时, 登录接口响应内容中tokenttl字段的值过大;恢复鉴权后客户端大面积403报错 about nacos HOT 3 CLOSED

DemonHugo avatar DemonHugo commented on May 26, 2024
临时关闭nacos鉴权时, 登录接口响应内容中tokenttl字段的值过大;恢复鉴权后客户端大面积403报错

from nacos.

Comments (3)

KomachiSion avatar KomachiSion commented on May 26, 2024

welcome to fix it

from nacos.

KomachiSion avatar KomachiSion commented on May 26, 2024

修复之前也考虑一下,现在未开启鉴权返回的token是固定的, token中会缺少ttl信息, 是不是连不开启鉴权的token也一起改一下,带上ttl信息。

from nacos.

DemonHugo avatar DemonHugo commented on May 26, 2024

修复之前也考虑一下,现在未开启鉴权返回的token是固定的, token中会缺少ttl信息, 是不是连不开启鉴权的token也一起改一下,带上ttl信息。

针对该情况 目前我在方法com.alibaba.nacos.plugin.auth.impl.token.impl.JwtTokenManager#createToken中,调整判断条件为:

  1. 当且仅当未开启鉴权及未配置盐值时,返回固定值
  2. 当未开启鉴权但正确配置盐值时,正常生成token
if (!authConfigs.isAuthEnabled() && null == jwtParser) {
    return AUTH_DISABLED_TOKEN;
} else if (authConfigs.isAuthEnabled()) {
    checkJwtParser();
}

from nacos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.