[app_store_connect_api_key] Trim key_id / issuer_id to prevent malformed JWT claims#29986
Merged
iBotPeaches merged 3 commits intoApr 30, 2026
Merged
Conversation
Copilot
AI
changed the title
[WIP] Fix whitespace handling for key_id and issuer_id in app_store_connect_api_key
Trim Apr 22, 2026
key_id / issuer_id in app_store_connect_api_key to prevent malformed JWT claims
key_id / issuer_id in app_store_connect_api_key to prevent malformed JWT claimskey_id / issuer_id to prevent malformed JWT claims
iBotPeaches
approved these changes
Apr 22, 2026
lacostej
approved these changes
Apr 29, 2026
Contributor
There was a problem hiding this comment.
Hey @Copilot 👋
Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a month, and your PR will be included in the next one.
Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀"
Contributor
There was a problem hiding this comment.
Congratulations! 🎉 This was released as part of fastlane 2.234.0 🚀
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
app_store_connect_api_keywas forwardingkey_idandissuer_idverbatim into token creation, so trailing whitespace/newlines (common from env vars/secrets copy-paste) could produce invalid JWTkid/issvalues and opaque 401 auth failures. This change normalizes those inputs at action boundary and covers nil behavior explicitly.Action input normalization
AppStoreConnectApiKeyAction.runto strip surrounding whitespace fromkey_idandissuer_id.nil(important for individual API key flows whereissuer_idcan be absent).Spec coverage for regression-prone cases
Spaceship::ConnectAPI::Token.create.nilkey_id/issuer_idare preserved asnil.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
coveralls.io/usr/bin/ruby3.2 ruby3.2 /home/REDACTED/work/fastlane/fastlane/vendor/bundle/ruby/3.2.0/bin/rspec fastlane/spec/actions_specs/app_store_connect_api_key_spec.rb --gdwarf-5 --64 -o ossl_x509ext.o /tmp/cchFN1Yj.s -I kward -I y-3.2.0 -I by-3.2.0 -I kward -I y-3.2.0 -I x86_64-linux-gnu-I(dns block)/usr/bin/ruby3.2 ruby3.2 /home/REDACTED/work/fastlane/fastlane/vendor/bundle/ruby/3.2.0/bin/rspec fastlane/spec/actions_specs/app_store_connect_api_key_spec.rb -quiet -sha�� -o ruby-3.2.0 ackward crc32_xfer_ext.oas y-3.2.0/ruby/bac-I -L/usr/lib/x86_6. y-3.2.0 -I by-3.2.0 -I kward -I y-3.2.0 -I as(dns block)/usr/bin/ruby3.2 ruby3.2 /home/REDACTED/work/fastlane/fastlane/vendor/bundle/ruby/3.2.0/bin/rspec fastlane/spec/actions_specs/app_store_connect_api_key_spec.rb as -I by-3.2.0 -I kward -I y-3.2.0 -I /usr/bin/ld -plu�� by-3.2.0 /libexec/gcc/x86_64-linux-gnu/13ossl_pkcs7.o kward s-through=-lgcc s-through=-lgcc_-c s-through=-lc s-through=-lgcc(dns block)If you need me to access, download, or install something from one of these locations, you can either:
fixes: #29985