Code Monkey home page Code Monkey logo

fastlane-action-csp's Introduction

Venafi Apache 2.0 License Community Supported Compatible with TPP 23.x

Automate Apple Code Signing with Venafi CodeSign Protect and Fastlane

Make sure to have the latest Venafi CodeSign Protect client for MacOS installed and configured. See documentation

The venafi_codesign_auth action will automate authentication/authorization for the CodeSign Protect client.

The venafi_codesign_cert action will automate the issuance of Apple code signing certificates within Venafi CodeSign Protect. This automation leverages API access and therefore you will need an appropriate API Integration with the following minimum scopes:

restricted:manage;configuration;certificate:discover

To fetch an appropriate access_token, you can use the following API call:

POST /vedauth/authorize/oauth HTTP/1.1
Host: tpp.example.com
Content-Type: application/json
Content-Length: 147

{
   "client_id":"apple-cert",
   "password":"SuperSecretPassword!",
   "scope":"restricted:manage;configuration;certificate:discover",
   "username":"local:myaccount"
}

Or using curl:

curl --location 'https://tpp.example.com/vedauth/authorize/oauth' \
--header 'Content-Type: application/json' \
--data '{
   "client_id":"apple-cert",
   "password":"SuperSecretPassword!!",
   "scope":"restricted:manage;configuration;certificate:discover",
   "username":"local:myaccount"
}'

Issue Apple Code Signing Certificate

Here is an example lane:

 lane :venafi_cert do
    app_store_connect_api_key(
      key_id: "<insert key id>",
      issuer_id: "<insert issuer id>",
      key_filepath: "/Users/developer/private_keys/AuthKey_ABC123.p8",
      duration: 1200
    )
    venafi_codesign_cert(
      tpp_url: "https://tpp.example.com",
      tpp_access_token: "lfhTMYQtLK+oHS6cUvOCLh==",
      tpp_policydn: "Code Signing\\Certificates",
      tpp_project: "AppleTestProject",
      tpp_environment: "Development",
      certificate_type: "APPLEDEVELOPMENT"
    )

Sign with CodeSign Protect:

Here is an example lane:

venafi_codesign_auth(tpp_url: "https://tpp.example.com",
                    tpp_username: "sample-cs-user",
                    tpp_password: "MySecret!"
                    )
    build_app(
      project: "SampleIOSApp.xcodeproj",
      scheme: "SampleIOSApp",
      output_name: "SampleIOSApp.ipa",
      export_method: "development",
      export_options: {
         provisioningProfiles: {
         "com.example.SampleIOSApp" => "Venafi Profile"
         }
      }
    )

Contributing to the FastLane actions for Venafi CodeSign Protect

Venafi welcomes contributions from the developer community.

  1. Fork it to your account (https://github.com/Venafi/fastlane-action-csp/fork)
  2. Clone your fork (git clone [email protected]:youracct/fastlane-action-csp.git)
  3. Create a feature branch (git checkout -b your-branch-name)
  4. Implement and test your changes
  5. Commit your changes (git commit -am 'Added some cool functionality')
  6. Push to the branch (git push origin your-branch-name)
  7. Create a new Pull Request (https://github.com/youracct/fastlane-action-csp/pull/new/your-branch-name)

License

Copyright © Venafi, Inc. All rights reserved.

fastlane-action-csp is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Please direct questions/comments to [email protected].

fastlane-action-csp's People

Contributors

zosocanuck avatar

Stargazers

Sitaram IYER avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.