All Projects → XCTEQ → Xctoken

XCTEQ / Xctoken

Licence: mit
On-Demand JWT Token generation for AppStore Connect API from CI Servers

Programming Languages

ruby
36898 projects - #4 most used programming language
swift
15916 projects

Projects that are alternatives of or similar to Xctoken

Escape
Release engineering, life-cycle management and Continuous Delivery of software platforms and artefacts
Stars: ✭ 199 (+804.55%)
Mutual labels:  devops-tools, continuous-integration, continuous-delivery
Gaia
Build powerful pipelines in any programming language.
Stars: ✭ 4,534 (+20509.09%)
Mutual labels:  devops-tools, continuous-integration, continuous-delivery
Rocket
Automated software delivery as fast and easy as possible 🚀
Stars: ✭ 217 (+886.36%)
Mutual labels:  devops-tools, continuous-integration, continuous-delivery
Flint
Fast and configurable filesystem (file and directory names) linter
Stars: ✭ 115 (+422.73%)
Mutual labels:  devops-tools, continuous-integration, continuous-delivery
bump-everywhere
🚀 Automate versioning, changelog creation, README updates and GitHub releases using GitHub Actions,npm, docker or bash.
Stars: ✭ 24 (+9.09%)
Mutual labels:  continuous-integration, continuous-delivery, devops-tools
Hygieia
CapitalOne DevOps Dashboard
Stars: ✭ 3,682 (+16636.36%)
Mutual labels:  continuous-integration, continuous-delivery
Jx
Jenkins X provides automated CI+CD for Kubernetes with Preview Environments on Pull Requests using Cloud Native pipelines from Tekton
Stars: ✭ 4,041 (+18268.18%)
Mutual labels:  continuous-integration, continuous-delivery
Agola
Agola: CI/CD Redefined
Stars: ✭ 783 (+3459.09%)
Mutual labels:  continuous-integration, continuous-delivery
Gitlab Ci Pipeline Php
☕️ Docker images for test PHP applications with Gitlab CI (or any other CI platform!)
Stars: ✭ 451 (+1950%)
Mutual labels:  continuous-integration, continuous-delivery
Elastic Ci Stack For Aws
An auto-scaling cluster of build agents running in your own AWS VPC
Stars: ✭ 313 (+1322.73%)
Mutual labels:  continuous-integration, continuous-delivery
Devops Readme.md
What to Read to Learn More About DevOps
Stars: ✭ 398 (+1709.09%)
Mutual labels:  continuous-integration, continuous-delivery
Haiku
🚀 Instant Heroku deploys from GitHub branches
Stars: ✭ 17 (-22.73%)
Mutual labels:  continuous-integration, continuous-delivery
Jenkins Build Monitor Plugin
Jenkins CI Build Monitor Plugin
Stars: ✭ 695 (+3059.09%)
Mutual labels:  continuous-integration, continuous-delivery
Jenkins
Jenkins automation server
Stars: ✭ 18,225 (+82740.91%)
Mutual labels:  continuous-integration, continuous-delivery
Circleci Images
Scripts to generate images for building projects on CircleCI 2.0
Stars: ✭ 397 (+1704.55%)
Mutual labels:  continuous-integration, continuous-delivery
Cds
Enterprise-Grade Continuous Delivery & DevOps Automation Open Source Platform
Stars: ✭ 3,677 (+16613.64%)
Mutual labels:  continuous-integration, continuous-delivery
Drone
Drone is a Container-Native, Continuous Delivery Platform
Stars: ✭ 24,287 (+110295.45%)
Mutual labels:  continuous-integration, continuous-delivery
Agent
The Buildkite Agent is an open-source toolkit written in Golang for securely running build jobs on any device or network
Stars: ✭ 534 (+2327.27%)
Mutual labels:  continuous-integration, continuous-delivery
Gocd
Main repository for GoCD - Continuous Delivery server
Stars: ✭ 6,314 (+28600%)
Mutual labels:  continuous-integration, continuous-delivery
Abstruse
Abstruse is a free and open-source CI/CD platform that tests your models and code.
Stars: ✭ 704 (+3100%)
Mutual labels:  continuous-integration, continuous-delivery

CI Status

XCToken

Generate on-demand JWT tokens forAppStore Connect API from Continuous Integration servers

Apple has announced AppStore Connect API to automate all the task related to Apple Developer Portal as well as iTunes Connect (recently known as AppStore Connect). You can watch WWDC session 303 to know more about this API. App Store Connect API can now interact with almost all the part of Apple Developer portal including, certificates, profiles and devices. App Store connect API will also touch almost all section of iTunes Connect which is remaned as App Store Connect including manging users and builds. However, this API requires JWT tokens to recieve response. Users needs to create tokens after every 20 minutes.

XCToken is a Ruby library to generate on-demand tokens for the AppStore Connect API so that we can create tokens using this library without need to write custom scripts on Continuous Integration Servers.

Installation

Its unlikely that you iOS application's has Gemfile and bundler setup but. Just in case you use other Ruby libraries like CocoaPods or Fastlane for managing versions then add this to Gemfile :

gem 'xctoken'

And then execute:

$ bundle install

Or install it on Continuous Integration Server using following command

$ gem install xctoken

Usage

Warning: **** This is early stage of library and not ready to use yet until Apple releases AppStore Connect API ****

Note: At the moment, AppStore Connect API has not released to public Yet nor the AppStore Connect GUI available to experiemnt. So there is no wat to test this library in real world envirnment until Apple release AppStore Connect API to public.

AppStore Connect API deals with very sensitive information so security is very important aspect. The new AppStore Connect GUI will have ability to generate API KEY and Private Key for API. We should also able to see ISSUER_ID in the AppStore Connect GUI.

XCToken needs 3 environmental variable setup to secure those credentials.

  • ISSUER_ID : You can get it from AppStore Connect GUI
  • KEY_DIR : AppStore Connect has a way to generate private key. We have to keep this key secure and always has associated KEY_ID the private key is in the .p8 format and reads like AuthKey_KEY_ID.p8. XCToken requires path to the directory where this private key located. e.g /tmp if you have private key at the path /tmp/AuthKey_1234.p8
  • KEY_ID : Every private key has KEY_ID we can set that as envirnment variable as well

On Continuous Integration server, we can secure these credential using Envirnmental Variable feature of specific CI server. These details shouldn't be exposed or hardcoded. You can enrypt and decrypt the .p8 format private key on CI server to add extra layer of security.

$ export ISSUER_ID=1234
$ export KEY_DIR=/tmp
$ export KEY_ID=1234

Now that, we all setup to generate the JWT tokens using XCToken by using following simple command.

$ xctoken generate

This will print the fresh token that we can use for the AppStore Connect API. We can run this command every time we need fresh token from CI server.

We can pass the printed token to an API call like so:

TOKEN=`xctoken generate`
curl -H "Authorization: Bearer $TOKEN" https://api.appstoreconnect.apple.com/v1/users

TODO

  • Test the library when Apple releases API
  • Add more options to generate token with multiple algorithms and expriry time
  • Ability to use keep token secret rather than printing to console
  • Add more RSpec Tests

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Shashikant86/xctoken. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Xctoken project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].