Giter Site home page Giter Site logo

kong-integration-samples's People

Contributors

ncarlier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kong-integration-samples's Issues

getting 500 request when trying to access /chuck API through Kong

Hi,

First of all - thanks for the amazing job for putting together this useful tutorial for integrating Keycloak and Kong.

I successfully setup the 2 with their respective configs (Chuck API protected by Nokia-OIDC plugin).

When I try to access the /chuck API I am well redirected to the keycloack login page, however after submitting the credentials, I am getting a 500 errors (browser and curl):

"request to the redirect_uri_path but there's no session state found" (and I can see the session cookies)

it looks like it's related to lua-resty-openidc and the session storage.
In your example are you experiencing the same at all ? Is there anything I am missing ?

Kong version: 0.11.1
kong-oidc: 1.0.4

Thanks !

Trying to use this example

kelfink/kong-konga-cognito-docker#1

I've grabbed this docker-compose.yml file and made a switch to just rely on the "kong:latest" image for kong, instead of a local build, and not using your ncarlier build. Not sure why but lots of errors. Do I need to be using your image for this to work? See errors at issue. thanks, and sorry it's a bit off topic to our repo.

Not able to deploy in docker stack

Thanks for the beautiful docker-compose which works great when deployed using docker-compose up -d --build but I want to deploy it in docker stack, which is not deploying the service at all.

I believe I have done all necessary changes required for deploying to docker stack.
Thanks

Dockerfile incomplete

Was not able to make with-keycloak build deploy.
Few more packages were needed:

RUN yum install -y openssl-devel gcc

how to access localhost:9000/chuck on the browser using the access_token generated from Keyclaok

Hello Ncarlier,
The blog was very helpfull to work with kong. I need some help in how to access the protected api localhost:9000/chuck on the browser by passing the access_token. It would be really helpfull.

I have client side application running on localhost:3000 and this link takes me to sample realm login once i login and try to access localhost:9000/chuck it gives unauthorized message.

client side code:

function getchuck () {
get('http://localhost:9000/chuck')
}

function getfree () {
get('http://localhost:9000/data1')
}

const div = document.getElementById('response')
function get (route) {
let req = new XMLHttpRequest
req.open('GET', route, true)
req.setRequestHeader('Accept', 'application/json')
req.setRequestHeader('Authorization', 'Bearer ' + keycloak.token)
req.onreadystatechange = function () {
if (req.readyState === 4) {
if (req.status === 200) {
div.innerText = req.responseText
} else {
div.innerText = 'Request returned: ' + req.status
}
}
}
req.send()
}

server side code:

app.get('/free',cors(), function (req, res) {
if (!req.headers['authorization']) return res.end()
let encToken = req.headers['authorization'].replace(/Bearer\s/, '')
let decToken = jwt.decode(encToken)
let clientAccess = decToken.resource_access['demo-client']
if (clientAccess && clientAccess.roles.includes('subscribed'))
res.json(['cat', 'dog', 'cow'])
else
res.json([])
})

I have added cors plugin to my services and routes.
Screen Shot 2019-05-30 at 4 51 24 PM

Thanks,
Nayana

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.