Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with jwt_secrets.key in kong 1.3 #4954

Closed
mickaelmagniez opened this issue Aug 22, 2019 · 2 comments · Fixed by #4981
Closed

Error with jwt_secrets.key in kong 1.3 #4954

mickaelmagniez opened this issue Aug 22, 2019 · 2 comments · Fixed by #4981
Labels

Comments

@mickaelmagniez
Copy link

Summary

I'm trying to update from 1.2 to 1.3 (db less), and this configuration prevent kong 1.3 to start:

_format_version: "1.1"

consumers:
  - username: foo

jwt_secrets:
  - consumer: foo
    key: "https://keycloak/auth/realms/foo"
    algorithm: RS256
    rsa_public_key: "-----BEGIN PUBLIC KEY----------END PUBLIC KEY-----"

Error is

nginx: [error] init_by_lua error: ...are/lua/5.1/kong/db/schema/others/declarative_config.lua:423: attempt to index local 'parent_fk' (a nil value)
stack traceback:
        ...are/lua/5.1/kong/db/schema/others/declarative_config.lua:423: in function 'get_key_for_uuid_gen'
        ...are/lua/5.1/kong/db/schema/others/declarative_config.lua:457: in function 'generate_ids'
        ...are/lua/5.1/kong/db/schema/others/declarative_config.lua:480: in function 'flatten'
        /usr/local/share/lua/5.1/kong/db/declarative/init.lua:153: in function 'parse_file'
        /usr/local/share/lua/5.1/kong/init.lua:252: in function 'parse_declarative_config'
        /usr/local/share/lua/5.1/kong/init.lua:430: in function 'init'
        init_by_lua:3: in main chunk

Removing key: "https://keycloak/auth/realms/foo" fixes error, but of course jwt validation doesn't work.

Best regards

@javimudi
Copy link

Hello, same issue here.

Back to 1.2 works ok.

Best

@guanlan
Copy link
Member

guanlan commented Aug 26, 2019

@mickaelmagniez @javimudi Thanks for your report, we will start the investigation shortly.

hishamhm added a commit that referenced this issue Aug 29, 2019
The uuid generator used by declarative config inadvertedly
assumed that the entities were nested.

Fixes #4954.
guanlan pushed a commit that referenced this issue Sep 4, 2019
The uuid generator used by declarative config inadvertedly
assumed that the entities were nested.

Fixes #4954.
NathanRichard pushed a commit to NathanRichard/kong that referenced this issue Sep 24, 2019
The uuid generator used by declarative config inadvertedly
assumed that the entities were nested.

Fixes Kong#4954.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants