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

Use pureconfig for invoker/scheduler's basic http auth #5252

Merged
merged 1 commit into from
May 31, 2022

Conversation

jiangpengcheng
Copy link
Contributor

Replace hardcode username:password

Description

Related issue and scope

  • I opened an issue to propose and discuss this change (#????)

My changes affect the following components

  • API
  • Controller
  • Message Bus (e.g., Kafka)
  • Loadbalancer
  • Scheduler
  • Invoker
  • Intrinsic actions (e.g., sequences, conductors)
  • Data stores (e.g., CouchDB)
  • Tests
  • Deployment
  • CLI
  • General tooling
  • Documentation

Types of changes

  • Bug fix (generally a non-breaking change which closes an issue).
  • Enhancement or new feature (adds new functionality).
  • Breaking change (a bug fix or enhancement which changes existing behavior).

Checklist:

  • I signed an Apache CLA.
  • I reviewed the style guides and followed the recommendations (Travis CI will check :).
  • I added tests to cover my changes.
  • My changes require further changes to the documentation.
  • I updated the documentation where necessary.

Copy link
Member

@style95 style95 left a comment

Choose a reason for hiding this comment

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

LGTM!

@codecov-commenter
Copy link

codecov-commenter commented May 27, 2022

Codecov Report

Merging #5252 (202637e) into master (1e09049) will decrease coverage by 25.91%.
The diff coverage is 81.81%.

@@             Coverage Diff             @@
##           master    #5252       +/-   ##
===========================================
- Coverage   70.76%   44.85%   -25.92%     
===========================================
  Files         238      238               
  Lines       14009    14013        +4     
  Branches      567      543       -24     
===========================================
- Hits         9914     6286     -3628     
- Misses       4095     7727     +3632     
Impacted Files Coverage Δ
...ache/openwhisk/core/invoker/FPCInvokerServer.scala 0.00% <0.00%> (-76.93%) ⬇️
.../scala/org/apache/openwhisk/core/WhiskConfig.scala 95.88% <100.00%> (+0.09%) ⬆️
.../openwhisk/core/invoker/DefaultInvokerServer.scala 38.46% <100.00%> (-61.54%) ⬇️
.../openwhisk/core/scheduler/FPCSchedulerServer.scala 95.83% <100.00%> (+95.83%) ⬆️
...a/org/apache/openwhisk/common/ConfigMapValue.scala 0.00% <0.00%> (-100.00%) ⬇️
.../apache/openwhisk/core/controller/Namespaces.scala 0.00% <0.00%> (-100.00%) ⬇️
...pache/openwhisk/core/controller/CorsSettings.scala 0.00% <0.00%> (-100.00%) ⬇️
...che/openwhisk/core/entitlement/RateThrottler.scala 0.00% <0.00%> (-100.00%) ⬇️
...he/openwhisk/core/entitlement/KindRestrictor.scala 0.00% <0.00%> (-100.00%) ⬇️
...penwhisk/core/database/cosmosdb/CosmosDBUtil.scala 0.00% <0.00%> (-100.00%) ⬇️
... and 161 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 1e09049...202637e. Read the comment docs.

@@ -176,6 +176,8 @@ whisk {
}

invoker {
username: "invoker.user"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should there be an equivalent default config for the scheduler?

Also don't know off the top of my head but is . a special character for curl requests? Wouldn't want to make it harder to curl the invoker with a special character for those that don't care about creds and just using the default

Copy link
Contributor Author

Choose a reason for hiding this comment

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

scheduler already has such config https://github.com/apache/openwhisk/blob/master/core/scheduler/src/main/resources/application.conf#L62-L63

and . is not special for curl:

[raja@localhost ansible]$ curl -u invoker.user:invoker.pass https://localhost:12001/isEnabled -k
{"enabled":true}

@ningyougang
Copy link
Contributor

LGTM

@ningyougang ningyougang merged commit 0c4aab1 into apache:master May 31, 2022
JesseStutler pushed a commit to JesseStutler/openwhisk that referenced this pull request Jul 13, 2022
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.

5 participants