Skip to content

Update Bookinfo code#6842

Closed
vadimeisenbergibm wants to merge 9 commits intoistio:masterfrom
vadimeisenbergibm:update_bookinfo_external_details
Closed

Update Bookinfo code#6842
vadimeisenbergibm wants to merge 9 commits intoistio:masterfrom
vadimeisenbergibm:update_bookinfo_external_details

Conversation

@vadimeisenbergibm
Copy link
Copy Markdown
Contributor

Today, after TLS external services are supported without necessary TLS origination, https://istio.io/blog/2018/egress-https/ must be rewritten to show access with TLS origination and without it. The code of the details must be changed accordingly.

Istio now can handle HTTPS (originated by the application). The decision
to use HTTP or HTTPS now is unrelated to the fact that the appliation
runs with Istio or without it.
@istio-testing istio-testing requested review from frankbu and rshriram July 4, 2018 11:15
@vadimeisenbergibm vadimeisenbergibm removed the request for review from rshriram July 4, 2018 11:15
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 4, 2018

Codecov Report

Merging #6842 into master will increase coverage by 1%.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #6842   +/-   ##
======================================
+ Coverage      71%     71%   +1%     
======================================
  Files         369     369           
  Lines       31977   32017   +40     
======================================
+ Hits        22461   22532   +71     
+ Misses       8597    8558   -39     
- Partials      919     927    +8
Impacted Files Coverage Δ
mixer/adapter/cloudwatch/handler.go 87% <0%> (-3%) ⬇️
mixer/adapter/rbac/rbacStore.go 76% <0%> (-3%) ⬇️
pilot/pkg/model/egress_rules.go 95% <0%> (-2%) ⬇️
mixer/adapter/bypass/bypass.go 62% <0%> (-1%) ⬇️
mixer/adapter/circonus/circonus.go 71% <0%> (ø) ⬇️
mixer/adapter/servicecontrol/checkprocessor.go 80% <0%> (ø) ⬇️
mixer/adapter/memquota/keys.go 100% <0%> (ø) ⬆️
mixer/adapter/stdio/zap.go 100% <0%> (ø) ⬆️
mixer/adapter/noop/noop.go 100% <0%> (ø) ⬆️
mixer/adapter/solarwinds/solarwinds.go 0% <0%> (ø) ⬆️
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 405f47f...6bd480d. Read the comment docs.

- containerPort: 9080
env:
- name: WITH_ISTIO
- name: DO_NOT_USE_TLS_FOR_EXTERNAL_SERVICE_CALLS
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn’t we be setting this to false always to show SNI routing ?
Also this name is too big. I suggest use_https_googleapis which is short n sweet

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@rshriram I propose to use this example to demonstrate both HTTP with TLS origination and HTTPS, and to compare between them. The idea is to demonstrate an organization that requires monitoring of the content and requires not to use TLS (HTTP with TLS origination). The environment variable simulates some general policy variable to enforce the policy of the organization. Maybe a simpler name would be DO_NOT_USE_TLS or DO_NOT_ENCRYPT.
Then I will compare this approach with HTTPS - an organization that does not have strict monitoring requirements and is OK to perform monitoring by SNI.

# WITH_ISTIO means that the details app runs with an Istio sidecar injected.
# DO_NOT_ENCRYPT means that the app must access external services without TLS,
# using unencrypted traffic protocols like HTTP. The TLS origination will be
# performed if needed, elsewhere, e.g. by a sidecar proxy.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This description seems too general and confusing. If I understand correctly, the flag is simply used to configure the code to use either HTTP or HTTPS when calling the external service, with HTTPS the default. I would suggest simply explaining what the flag does:

# DO_NOT_ENCRYPT is used to configure the details service to use either HTTP (true) or HTTPS (false, default)
# when calling the external service to retrieve the book information.

IMO, explaining that a sidecar may perform TLS origination is not helpful here, that belongs in the docs.

# Without the Istio sidecar injected, the TLS origination must be performed by the `http` object,
# by setting `use_ssl` field to true.
unless ENV['WITH_ISTIO'] === 'true' then
# If this environment variable is false, the app must use TLS, e.g. HTTPS, to access
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unless this environment variable is set to true, the app will use TLS (HTTPS) to access

vadimeisenbergibm and others added 3 commits July 10, 2018 15:03
niaquinto/gradle has been removed from docker
* Switch back to standard ratings image
* Remove unneeded file name
* Update Writer flush in productpage.py
* Allow services domain to be configurable
* This is needed to run on CloudFoundry
@googlebot
Copy link
Copy Markdown
Collaborator

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@googlebot googlebot added cla: no Set by the Google CLA bot to indicate the author of a PR has not signed the Google CLA. and removed cla: yes labels Jul 10, 2018
Copy link
Copy Markdown
Contributor

@frankbu frankbu left a comment

Choose a reason for hiding this comment

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

/lgtm

@istio-testing
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: frankbu, vadimeisenbergibm

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@istio-testing
Copy link
Copy Markdown
Collaborator

New changes are detected. LGTM label has been removed.

@vadimeisenbergibm
Copy link
Copy Markdown
Contributor Author

/test e2e-mixer-no_auth

@vadimeisenbergibm
Copy link
Copy Markdown
Contributor Author

/test e2e-bookInfo-envoyv2-v1alpha3

@vadimeisenbergibm vadimeisenbergibm changed the base branch from master to release-1.0 July 10, 2018 20:10
@vadimeisenbergibm vadimeisenbergibm changed the base branch from release-1.0 to master July 10, 2018 20:12
@vadimeisenbergibm
Copy link
Copy Markdown
Contributor Author

/test e2e-mixer-no_auth

@rshriram rshriram changed the title Update Istio details v2 to optionally use HTTP Update Bookinfo code Jul 10, 2018
@istio-testing
Copy link
Copy Markdown
Collaborator

istio-testing commented Jul 10, 2018

@vadimeisenbergibm: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
prow/e2e-bookInfoTests-v1alpha3.sh 6bd480d link /test e2e-bookInfo-envoyv2-v1alpha3
Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@andraxylia
Copy link
Copy Markdown
Contributor

@vadimeisenbergibm can we do this on release-1.0 branch?

That will get merged periodically.

@vadimeisenbergibm
Copy link
Copy Markdown
Contributor Author

@andraxylia yes, let me resubmit the PR to release-1.0 branch.

@vadimeisenbergibm
Copy link
Copy Markdown
Contributor Author

Resubmitted as #6988 to release-1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: no Set by the Google CLA bot to indicate the author of a PR has not signed the Google CLA.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants