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

Set the Bearer prefix in bindings. #5484

Merged
merged 5 commits into from Apr 8, 2020
Merged

Set the Bearer prefix in bindings. #5484

merged 5 commits into from Apr 8, 2020

Conversation

gerolf-da
Copy link
Contributor

This means it must be removed in the token files.

CHANGELOG_BEGIN
[Extractor]: The Bearer prefix must be removed from the token file.
[Navigator]: The Bearer prefix must be removed from the token file.
CHANGELOG_END

Pull Request Checklist

  • Read and understand the contribution guidelines
  • Include appropriate tests
  • Set a descriptive title and thorough description
  • Add a reference to the issue this PR will solve, if appropriate
  • Include changelog additions in one or more commit message bodies between the CHANGELOG_BEGIN and CHANGELOG_END tags
  • Normal production system change, include purpose of change in description

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with /AzurePipelines run to
trigger the build.

Copy link
Contributor

@cocreature cocreature left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m a bit confused, I would have expected that we enforce this on the server side as well. Without doing this, this just limits the ledgers we can interact with.

Changelog is missing DAML Script,DAML Repl and the ledger bindings and I expect that there are also some docs that mention this (at the very least the docs for DAML Script over the JSON API has a caveat that it does not expect the Bearer prefix in the token file which is now redundant).

@gerolf-da
Copy link
Contributor Author

@cocreature: I'm making a few more changes at the moment. I'm thinking of dropping the Bearer prefix altogether for the gRPC Ledger API. Might still make sense to keep it in the JSON API, as there the user needs to explicitly set http headers, whereas with gRPC it's just arbitrary metadata.

This means it must be removed in the token files.

CHANGELOG_BEGIN
[Extractor]: The ``Bearer `` prefix can be removed from the token file.
It is added automatically.
[Navigator]: The ``Bearer `` prefix can be removed from the token file.
It is added automatically.
CHANGELOG_END
CHANGELOG_BEGIN
[DAML Script] The ``Bearer `` prefix can be removed from the token file. It
is added automatically.
[DAML Repl] The ``Bearer `` prefix can be removed from the token file. It is
added automatically.
[Scala Bindings] The ``Bearer `` prefix can be removed from the token. It is
added automatically.
[Java Bindings] The ``Bearer `` prefix can be removed from the token. It is
added automatically.
CHANGELOG_END
CHANGELOG_BEGIN
[DAML Integration Kit] ``AuthService`` implementations MUST read the
``Authorization`` header and the value of the header MUST start with
``Bearer ``.
CHANGELOG_END
Copy link
Contributor

@cocreature cocreature left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great ,thanks a lot! And sorry for the confusion.

@gerolf-da
Copy link
Contributor Author

No no, thanks for asking the right questions, @cocreature!

@gerolf-da gerolf-da merged commit 9743374 into master Apr 8, 2020
@gerolf-da gerolf-da deleted the require-bearer-prefix branch April 8, 2020 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants