Giter VIP home page Giter VIP logo

aws-iot-custom-authorizer-sample's People

Contributors

dependabot[bot] avatar massi-ang avatar

Stargazers

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

Watchers

 avatar  avatar

aws-iot-custom-authorizer-sample's Issues

Browser Test Client Fails to Connect - Similar Solution

I built a similar solution to this using python. I was able to verify with the aws iot test-invoke-authorizer command that it is returning a policy (denial of course, as there are no query string args to use with this tool).

Using the index.html solution you provide in this repo, I am unable to establish a connection using the token (first two segments concatenated with the '.' between) and the signature (the last portion of the jwt with additional regex work I saw in your example sig.replace(/_/gi, '/').replace(/-/gi, '+') + '==') which honestly I am confused by what this is doing other than making it fit a regex used by the aws cli command mentioned previously.

I also created a thing in IoT core for good measure mqtt_client but I am thinking this might not be necessary since I am using an Azure AD token and the keys provided by its public .well-known document (as described in the README).

When I hit connect in the web tool, it seems to get stuck in a loop attempting to make the websocket connection with the query string values provided by the UI. It continuously closes the connection and tries again. The error object in the callback does not seem to be defined and the HTTP Status codes are all 101.

I guess I am wondering if there is something I am missing here? If the custom authorizer is able to return the policy with rights to iot:Connect and I used '*' for the resource value just for testing, then what would keep the browser client (running locally) from establishing the connection via websocket? Any ideas? Thanks in advance!

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.