Hi Norbert, On Monday, 9 January 2017 13:07:55 UTC+1, Norbert Kiss wrote: > > Unfortunately based on our security policy I can't share more that I did > it before, but now I show the full process. >
In that case I can only tell you that the whole access token functionality works for me™. As a last straw, make sure that the access token authentication provider is activated on the System / Authentication page. Working example: $ curl -i -u admin:admin -H 'Accept: application/json' -X POST 'http://127.0.0.1:9000/api/users/admin/tokens/test-token?pretty=true' HTTP/1.1 200 OK X-Graylog-Node-ID: cd03ee44-b2a7-4824-be16-bb7456149dbd Content-Type: application/json Date: Mon, 09 Jan 2017 15:14:18 GMT Content-Length: 141 { "name" : "test-token", "token" : "1o258cojhut0sjj9dqaogqfohkdpns85d5i840cu02913o3nn9ks", "last_access" : "1970-01-01T00:00:00.000Z" } $ curl -i -u 1o258cojhut0sjj9dqaogqfohkdpns85d5i840cu02913o3nn9ks:token http://127.0.0.1:9000/api/system?pretty=true HTTP/1.1 200 OK X-Graylog-Node-ID: cd03ee44-b2a7-4824-be16-bb7456149dbd X-Runtime-Microseconds: 36657 Content-Type: application/json Date: Mon, 09 Jan 2017 15:15:02 GMT Content-Length: 441 { "facility" : "graylog-server", "codename" : "Stiegl", "node_id" : "cd03ee44-b2a7-4824-be16-bb7456149dbd", "cluster_id" : "b1ce3a29-6845-4e00-bd8c-d4499dc9e95d", "version" : "2.2.0-rc.1-SNAPSHOT", "started_at" : "2017-01-09T15:13:27.589Z", "hostname" : "joschi-mbp15.lan", "lifecycle" : "running", "lb_status" : "alive", "timezone" : "Europe/Berlin", "operating_system" : "Mac OS X 10.12.2", "is_processing" : true } $ curl -i -u admin:admin -H 'Accept: application/json' -X GET 'http://127.0.0.1:9000/api/users/admin/tokens/?pretty=true' HTTP/1.1 200 OK X-Graylog-Node-ID: cd03ee44-b2a7-4824-be16-bb7456149dbd Content-Type: application/json Date: Mon, 09 Jan 2017 15:15:45 GMT Content-Length: 319 { "tokens" : [ { "name" : "test-1234", "token" : "8oe6l5b0db378b0qfsufa1j9jr4bnlvng1m6o998rag8fcmusj1", "last_access" : "2016-08-08T12:14:46.431Z" }, { "name" : "test-token", "token" : "1o258cojhut0sjj9dqaogqfohkdpns85d5i840cu02913o3nn9ks", "last_access" : "2017-01-09T15:15:02.670Z" } ] } $ curl -i -u admin:admin -H 'Accept: application/json' -X DELETE 'http://127.0.0.1:9000/api/users/admin/tokens/1o258cojhut0sjj9dqaogqfohkdpns85d5i840cu02913o3nn9ks?pretty=true' HTTP/1.1 204 No Content X-Graylog-Node-ID: cd03ee44-b2a7-4824-be16-bb7456149dbd Date: Mon, 09 Jan 2017 15:16:02 GMT $ curl -i -u admin:admin -H 'Accept: application/json' -X GET 'http://127.0.0.1:9000/api/users/admin/tokens/?pretty=true' HTTP/1.1 200 OK X-Graylog-Node-ID: cd03ee44-b2a7-4824-be16-bb7456149dbd Content-Type: application/json Date: Mon, 09 Jan 2017 15:16:05 GMT Content-Length: 168 { "tokens" : [ { "name" : "test-1234", "token" : "8oe6l5b0db378b0qfsufa1j9jr4bnlvng1m6o998rag8fcmusj1", "last_access" : "2016-08-08T12:14:46.431Z" } ] } Cheers, Jochen -- You received this message because you are subscribed to the Google Groups "Graylog Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/graylog2/1a47d43c-98bf-49f1-8afc-95ec77a73438%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
