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

Builds are failing failing Auth Tests #533

Closed
stevengum opened this issue Oct 12, 2018 · 2 comments
Closed

Builds are failing failing Auth Tests #533

stevengum opened this issue Oct 12, 2018 · 2 comments
Assignees
Labels
4.2 December 15, 2018 Release bug Indicates an unexpected problem or an unintended behavior.

Comments

@stevengum
Copy link
Member

This affects tests that do not use a valid MSA AppId and AppPassword, but instead use an old generated Auth Token. The problem is that whenever the keys get rotated out, the auth token becomes invalid and needs to be renewed.

Instead of continuing with this auth token route, JS should take should take a page out the .NET repo and get a new token whenever the tests are run in Travis.

@stevengum stevengum self-assigned this Oct 12, 2018
stevengum added a commit that referenced this issue Oct 12, 2018
temporarily disable AuthHeader tests to stop build breaks, #533
@benbrown benbrown added bug Indicates an unexpected problem or an unintended behavior. Approved labels Oct 12, 2018
@stevengum
Copy link
Member Author

Update on this, for the AuthHeader tests the tokens obtained trigger the emulator validation path. This might mean there might be an underlying issue in our auth stack.

What this means in a shallow sense is that the second test fails because the auth stack successfully validates the token though the channelId is incorrect (neither 'webchat' nor 'emulator'):

        it('with incorrect ChannelId should not validate', function(done) {
            Connector.ChannelValidation.ToBotFromChannelTokenValidationParameters.ignoreExpiration = true;
            var header = 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IkdDeEFyWG9OOFNxbzdQd2VBNy16NjVkZW5KUSIsIng1dCI6IkdDeEFyWG9OOFNxbzdQd2VBNy16NjVkZW5KUSJ9.eyJzZXJ2aWNldXJsIjoiaHR0cHM6Ly93ZWJjaGF0LmJvdGZyYW1ld29yay5jb20vIiwiaXNzIjoiaHR0cHM6Ly9hcGkuYm90ZnJhbWV3b3JrLmNvbSIsImF1ZCI6IjM5NjE5YTU5LTVhMGMtNGY5Yi04N2M1LTgxNmM2NDhmZjM1NyIsImV4cCI6MTUxNjczNzUyMCwibmJmIjoxNTE2NzM2OTIwfQ.TBgpxbDS-gx1wm7ldvl7To-igfskccNhp-rU1mxUMtGaDjnsU--usH4OXZfzRsZqMlnXWXug_Hgd_qOr5RH8wVlnXnMWewoZTSGZrfp8GOd7jHF13Gz3F1GCl8akc3jeK0Ppc8R_uInpuUKa0SopY0lwpDclCmvDlz4PN6yahHkt_666k-9UGmRt0DDkxuYjbuYG8EDZxyyAhr7J6sFh3yE2UGRpJjRDB4wXWqv08Cp0Gn9PAW2NxOyN8irFzZH5_YZqE3DXDAYZ_IOLpygXQR0O-bFIhLDVxSz6uCeTBRjh8GU7XJ_yNiRDoaby7Rd2IfRrSnvMkBRsB8MsWN8oXg';
            var credentials = new Connector.SimpleCredentialProvider('39619a59-5a0c-4f9b-87c5-816c648ff357', '');
            Connector.JwtTokenValidation.validateAuthHeader(header, credentials, undefined, 'foo', 'https://webchat.botframework.com/')
                .then(claims => done(new Error('Expected validation to fail.')))
                .catch(err => done())
                .then(() => {
                    Connector.ChannelValidation.ToBotFromChannelTokenValidationParameters.ignoreExpiration = false;
                });
        });

@stevengum
Copy link
Member Author

Unrelated issue found via #557: one of the ChannelValidator tests throws a TypeError instead of an Error with a custom message, indicating that the test may be finishing in an incorrect/unexpected fashion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.2 December 15, 2018 Release bug Indicates an unexpected problem or an unintended behavior.
Projects
None yet
Development

No branches or pull requests

4 participants