Skip to content

"AuthConfig" unrecognized field 'identitytoken' due config loading #921

@AleksTwin

Description

@AleksTwin

Hello, we got the issue, using latest version of "docker-java" while trying to load and parse DOCKER configuration file ("$HOME/.docker/config.json").

It doesn't accept the field 'identitytoken'. I have noticed that you have 'registrytoken' field, which have been used since DOCKER API v1.22 version for the same purpose. I checked documentation, it was renamed there into --> 'identytoken' just in the next DOCKER API v1.23 version.

Here is some stacktrace for more detailed info:

Caused by: java.lang.IllegalArgumentException: Unrecognized field "identitytoken" (class com.github.dockerjava.api.model.AuthConfig), not marked as ignorable (6 known properties: "serveraddress", "username", "auth", "password", "email", "registrytoken"])
 at [Source: N/A; line: -1, column: -1] (through reference chain: java.util.LinkedHashMap["auths"]->java.util.LinkedHashMap["hostname"]->com.github.dockerjava.api.model.AuthConfig["identitytoken"])
	at com.fasterxml.jackson.databind.ObjectMapper._convert(ObjectMapper.java:3589)
	at com.fasterxml.jackson.databind.ObjectMapper.convertValue(ObjectMapper.java:3530)
	at com.fasterxml.jackson.databind.ObjectMapper.convertValue(ObjectMapper.java:3518)
	at com.github.dockerjava.core.AuthConfigFile.loadConfig(AuthConfigFile.java:120)
 

Looks, that should be enough to just rename '@JsonProperty("identitytoken")'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions