Skip to content

Commit 88897ae

Browse files
LaunchDarklyReleaseBothroederldbwoskow-ldLaunchDarklyCILaunchDarklyReleaseBot
authored
prepare 1.1.1 release (#10)
* fix history, merge in rough evaluation * [ch88982] polling with bridge (#3) * [ch89618] add basic CI to build bridge * Increase testing and expand on handling of error cases. (#6) * Event scaffolding, and basic operators / allFlags (#7) * [ch88983] More event logic (#8) * [ch88983] event summarization (#9) * [ch88983] Add more complete event bundling (#10) * [ch92034] more evaluation operator support (#12) * [ch92034] Add semver operator support (#13) * fix issues to pass wrapper * [ch89623] API documention (#14) * miscellaneous tiny tasks (#15) * do not require key for config * remove commented out try / catch blocks * another location where LDConfig constructor needed to be updated * Add a helper Makefile to assist dev cycle * update Makefile to force push to Salesforce * update LDClient to construct default LDConfig if config is null * [ch94250] limit event queue (#16) * Cleanup bridge implementation (#17) * [ch94716] Use new SDK domain (#19) * Remove RESTWrapper logic (#18) * [ch94746] add constructor to LDClient that uses default LDConfig (#20) * [ch94864] add user agent to bridge #21 * update semver to the format we have used before * add minimal changelog * add beta disclaimer * correct title of Salesforce in README * correct reference to incorrect SDK * update changelog initial warning * Adding the pull request template (#22) * [ch98184] [ch98185] Add JWT auth, add scratch org CI, refactor (#23) * [ch98838] bump http timeout to 30 seconds and make configurable #24 * [ch98980] releaser config for beta 2 (#25) * Removed the guides link * [ch99747] Add alias support (#26) * [ch110766] Fix bucketBy behavior when attribute does not exist * remove beta warning (#27) * [ch108417] experimentation allocation (#29) * Updates docs URLs * Guard against invalid PEM decoding of OAUTH_JWT_KEY The return value of pem.Decode must be checked, as it can be nil if decoding fails. This previously caused a panic; now it should return an error. * Clarify error messages related to private key decoding * Add gitignore * Rename master->main in PR template * Bump circleci/salesforce-sfdx to 2.2.0 Co-authored-by: Harpo Roeder <hroeder@launchdarkly.com> Co-authored-by: Ben Woskow <48036130+bwoskow-ld@users.noreply.github.com> Co-authored-by: Ben Woskow <bwoskow@launchdarkly.com> Co-authored-by: LaunchDarklyCI <dev@launchdarkly.com> Co-authored-by: LaunchDarklyReleaseBot <launchdarklyreleasebot@launchdarkly.com> Co-authored-by: Ember Stevens <ember.stevens@launchdarkly.com> Co-authored-by: ember-stevens <79482775+ember-stevens@users.noreply.github.com> Co-authored-by: Casey Waldren <cwaldren@launchdarkly.com>
1 parent a199fe9 commit 88897ae

6 files changed

Lines changed: 13 additions & 9 deletions

File tree

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: 2.1
22

33
orbs:
4-
sfdx: circleci/salesforce-sfdx@2.1.0
4+
sfdx: circleci/salesforce-sfdx@2.2.0
55

66
workflows:
77
version: 2

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
**Requirements**
22

33
- [ ] I have added test coverage for new or changed functionality
4-
- [ ] I have followed the repository's [pull request submission guidelines](../blob/master/CONTRIBUTING.md#submitting-pull-requests)
4+
- [ ] I have followed the repository's [pull request submission guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests)
55
- [ ] I have validated my changes against all supported platform versions
66

77
**Related issues**

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea/

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing to the LaunchDarkly Server-Side SDK for Apex
22

3-
LaunchDarkly has published an [SDK contributor's guide](https://docs.launchdarkly.com/docs/sdk-contributors-guide) that provides a detailed explanation of how our SDKs work. See below for additional information on how to contribute to this SDK.
3+
LaunchDarkly has published an [SDK contributor's guide](https://docs.launchdarkly.com/sdk/concepts/contributors-guide) that provides a detailed explanation of how our SDKs work. See below for additional information on how to contribute to this SDK.
44

55
## Submitting bug reports and feature requests
66

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Download a release archive from the [GitHub Releases](https://github.com/launchd
88

99
## Learn more
1010

11-
Check out our [documentation](https://docs.launchdarkly.com) for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the [complete reference guide for this SDK](https://docs.launchdarkly.com/sdk/server-side/apex).
11+
Read our [documentation](https://docs.launchdarkly.com) for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the [complete reference guide for this SDK](https://docs.launchdarkly.com/sdk/server-side/apex).
1212

1313
## Testing
1414

@@ -25,7 +25,7 @@ We encourage pull requests and other contributions from the community. Check out
2525
* Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
2626
* Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
2727
* Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline.
28-
* LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out [our documentation](https://docs.launchdarkly.com/docs) for a complete list.
28+
* LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Read [our documentation](https://docs.launchdarkly.com/sdk) for a complete list.
2929
* Explore LaunchDarkly
3030
* [launchdarkly.com](https://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information
3131
* [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides

bridge/main.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,18 @@ func newBridge() (*Bridge, error) {
103103
} else {
104104
decodedString, err := base64.StdEncoding.DecodeString(oauthJWTKey)
105105
if err != nil {
106-
return nil, errors.New("OAUTH_JWT_KEY base64 decode failed")
106+
return nil, errors.New("OAUTH_JWT_KEY is not valid standard-encoding base64")
107+
}
108+
pem, _ := pem.Decode(decodedString)
109+
if pem == nil {
110+
return nil, errors.New("OAUTH_JWT_KEY is not a valid PEM-encoded block")
107111
}
108-
pem, _ := pem.Decode([]byte(decodedString))
109112
if pem.Type != "RSA PRIVATE KEY" {
110-
return nil, errors.New("OAUTH_JWT_KEY PEM expected RSA PRIVATE KEY failed")
113+
return nil, errors.New("OAUTH_JWT_KEY PEM block must be called 'RSA PRIVATE KEY'")
111114
}
112115
decodedX509, err := x509.ParsePKCS1PrivateKey(pem.Bytes)
113116
if err != nil {
114-
return nil, errors.New("OAUTH_JWT_KEY x509 decode failed")
117+
return nil, errors.New("OAUTH_JWT_KEY failed to decode PKCS1 private key from PEM bytes")
115118
}
116119
bridge.oauthJWTKey = decodedX509
117120
}

0 commit comments

Comments
 (0)