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

INFENG-6103 allow no origin header requests #79

Merged
merged 3 commits into from
Aug 13, 2018
Merged

INFENG-6103 allow no origin header requests #79

merged 3 commits into from
Aug 13, 2018

Conversation

blakeroberts-wk
Copy link
Contributor

@blakeroberts-wk blakeroberts-wk commented Aug 3, 2018

https://jira.atl.workiva.net/browse/INFENG-6103

What

  • Allow requests w/o origin header to pass
  • Add Dockerfile
  • Add Glide
  • Update Travis

@Workiva/product2

@aviary2-wf
Copy link

Security Insights

The items listed below may not capture all security relevant changes. Before providing a security review, be sure to review the entire PR for security impact.

(1) Security relevant changes were detected
  • Watched file rest/middleware/cors.go modified
  • Action Items

    • Obtain a security review; reviewer should pay special attention to insights listed above
    • Verify aviary.yaml coverage of security relevant code

    Questions or Comments? Reach out on HipChat: InfoSec Forum.

    Dockerfile Outdated
    COPY . /go/src/github.com/Workiva/go-rest

    #install glide and install dependencies
    RUN go get -u github.com/Masterminds/glide

    Choose a reason for hiding this comment

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

    nit: I'd add this before the repo copy so it could potentially be cached

    glide.lock Outdated
    @@ -0,0 +1,31 @@
    hash: aa3313d279fdff7629632676678092f79f7d06aa660ea28595f6d1fe79c1a14f

    Choose a reason for hiding this comment

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

    As this is a library we shouldn't check in the lock file

    glide.yaml Outdated
    version: ~1.1.1
    - package: github.com/gorilla/mux
    version: ~1.6.2
    - package: github.com/blakeroberts-wk/mustache

    Choose a reason for hiding this comment

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

    I'm not sure what the rules around pulling from our forks are, we should look into that

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

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

    originMatch := false
    if origin := r.Header.Get("Origin"); checkOrigin(origin, originWhitelist) {
    if checkOrigin(origin, originWhitelist) {

    Choose a reason for hiding this comment

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

    Should we add a check for the origin header being missing here, as opposed to doing the check unnecessarily?

    @blakeroberts-wk
    Copy link
    Contributor Author

    @matthewsullivan-wf Would you mind weighing in on these changes?

    @matthewsullivan-wf
    Copy link

    +1 security, all appears to be well

    @brianshannan-wf
    Copy link

    +1

    @blakeroberts-wk
    Copy link
    Contributor Author

    @Workiva/release-management-p

    @rmconsole3-wf rmconsole3-wf merged commit d26de9a into Workiva:master Aug 13, 2018
    @blakeroberts-wk blakeroberts-wk deleted the INFENG-6103-allow-no-origin-header-requests branch August 13, 2018 18:21
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    7 participants