1. 12 8月, 2019 1 次提交
    • A
      Add option to disable authentication for proxy /metrics (#4921) · be7b24f9
      Addison Higham 提交于
      This commit adds a new option optionally disable authentication for the
      `/metrics` endpoint in the pulsar-proxy.
      
      Currently, authentication is required for the metrics endpoint when
      authentication is enabled, which makes monitoring more difficult.
      However, rather than just disable it completely and allow for metrics to
      be exposed to any unknown user, this makes it opt in.
      
      It could be argued that it should default to false, but as it is likely
      that the proxy is the only component potentially exposed to the public internet, we
      default to not exposing data.
      
      Fixes #4920
      be7b24f9
  2. 10 7月, 2019 1 次提交
  3. 14 6月, 2019 1 次提交
    • A
      [pulsar-broker] Add support for other algorithms in token auth (#4528) · 04e5fee6
      Addison Higham 提交于
      Before this patch, all keys are read as RSA, which meant that only RSA
      compatible JWT signing algorithms could be used, specifically, this
      limited the use of ECDSA family of JWT keys.
      
      This changes this by changing the signature we use to parse keys to also
      take a SignatureAlgorithm and also adds a new config option
      `tokenPublicAlg` which can be used to signify what algorithm the
      broker/proxy should use when reading public keys. However, these all
      default to RS256, which, should indicate to decode as RSA (even if
      another RS/PS algoritm is used).
      
      This also adds some new options to the Token CLI tool for those commands
      that weren't respecting the algorithm, but these are defaulted to RS256
      as well.
      04e5fee6
  4. 04 6月, 2019 1 次提交
    • A
      [tiered-storage] Add support for AWS instance and role creds (#4433) · 176c901a
      Addison Higham 提交于
      * Add support for AWS instance and role creds
      
      This commit makes changes to the tiered storage support for S3
      to allow for support of ec2 metadata instance credentials as well as
      additional config options for assuming a role to get credentials.
      
      This works by changing the way we provide credentials to use the
      funtional `Supplier` interface and for using the AWS specific
      `SessionCredentials` object for when we detect that the
      `CredentialProvider` is providing credentials that have a session token.
      
      * [tiered_storage] Tweak s3 credential handling to check on boot
      
      This changes the s3 handling slightly, instead of falling back to static
      credentials, we instead now fail if no s3 credentials can be found and
      change the unit tests to start a broker with s3 credentials.
      
      With the new Supplier API, we now fetch credentials on every request.
      Because of this, the failure and subsequent try/catch is costly and the
      integration tests were using this, which caused them to be significantly
      slower.
      
      Instead, we just check to see if we can fetch creds, and if we can't
      consider it an error condition to exit the app as it is unlikely in a
      production scenario to not have some credentials.
      
      * fix s3 test for missing creds
      176c901a
  5. 18 5月, 2019 2 次提交
  6. 04 5月, 2019 1 次提交
  7. 02 5月, 2019 1 次提交
    • M
      Allow to configure the managed ledger cache eviction frequency (#4066) · f5c7b22f
      Matteo Merli 提交于
      * Allow to configure the managed ledger cache eviction frequency
      
      * Fixed test
      
      * Simplified the cache eviction to make it predictable at the configured frequency
      
      * Address comments
      
      * Apply eviction on slowest active reader by preference
      
      * Re-introduced backlogged subscriptions test
      
      * Addressed comments
      
      * Use config option
      
      * Fixed active/inactive logic and read position
      
      * Use dedicated thread for cache evictions
      
      * Added config options in docs
      
      * Fixed tests
      
      * Added time triggered eviction test
      
      * Fixed flaky test
      
      * Fixed tests
      f5c7b22f
  8. 26 3月, 2019 1 次提交
  9. 15 3月, 2019 1 次提交
  10. 02 3月, 2019 1 次提交
  11. 27 2月, 2019 1 次提交
  12. 14 2月, 2019 1 次提交
  13. 12 2月, 2019 2 次提交
  14. 20 1月, 2019 1 次提交
  15. 13 12月, 2018 1 次提交
    • C
      Add bookkeeperClientRegionawarePolicyEnabled and bookkeeperClientReor… (#3171) · 24cc4bbb
      Christophe Bornet 提交于
      ## Motivation
      Fix #3119. This allows to configure region-aware policy and read-reordering so that brokers first read on bookies of their own region.
      
      ## Modifications
      1. Added parameters:
      ```
      // Enable region-aware bookie selection policy. BK will chose bookies from
      // different regions and racks when forming a new bookie ensemble
      // If enabled, the value of bookkeeperClientRackawarePolicyEnabled is ignored
      bookkeeperClientRegionawarePolicyEnabled=false
      
      // Enable/disable reordering read sequence on reading entries.
      bookkeeperClientReorderReadSequenceEnabled=false
      ```
      
      2. Fixed bug in ZkBookieRackAffinityMapping: the value set to racksWithHost by deserialize() was overriden by the affectation in setConf(). The fix just moves the hostname workaround in setConf().
      
      ## Result
      Users can enable bookkeeperClientRegionawarePolicyEnabled and bookkeeperClientReorderReadSequenceEnabled to make brokers read on bookies of their own region
      24cc4bbb
  16. 29 11月, 2018 1 次提交
    • M
      PIP-25: Token based authentication (#2888) · a99f7332
      Matteo Merli 提交于
      * PIP-25: Token based authentication
      
      * Addressed comments
      
      * Use Authorization header
      
      * Update to support env: data: and file: as sources for keys and tokens
      
      * Fixed cli description
      
      * Updated broker.conf
      
      * Improved consistency in reading keys and CLI tools
      
      * Fixed check for http headers
      
      * Accept rel time with no specified unit
      
      * Fixed reading data: URL
      
      * Addressed comments
      
      * Added integration tests
      
      * Addressed comments
      
      * Added CLI command to validate token against key
      
      * Fixed integration tests
      
      * Removed env:
      
      * Fixed rel time parsing
      a99f7332
  17. 27 11月, 2018 1 次提交
  18. 25 9月, 2018 1 次提交
  19. 29 8月, 2018 1 次提交
  20. 16 8月, 2018 1 次提交
    • M
      Increased default brokerShutdownTimeout to 60 seconds (#2377) · 7416fc0c
      Matteo Merli 提交于
      ### Motivation
      
      The default timeout for broker graceful shutdown is set to 3 seconds. This can give little room to do graceful shutdown when the broker is serving a lot of topics.
      
      There is no big downside in increasing the timeout to a much bigger value.
      7416fc0c
  21. 02 8月, 2018 1 次提交
  22. 23 7月, 2018 1 次提交
    • C
      Pulsar website using docusaurus (#2206) · 7d75fd28
      cckellogg 提交于
      ### Motivation
      
      Improve the documentation and usability of the pulsar website. This moves the website and documentation to a new framework (https://docusaurus.io/)  which will make it easier to maintain going forward.
      
      ### Modifications
      
      A new version of the website in site2 directory. Also updates the pulsar build docker to add the new website build dependencies.
      
      ### Result
      
      A more usable website and documentation.
      
      A preview of the site can be seen here: https://cckellogg.github.io/incubator-pulsar
      *All the links and images might not work on this site since it's a test only site*
      7d75fd28