Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8733061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:34:05+00:00 2026-06-13T09:34:05+00:00

I have a Rails application with a public REST API which authenticates API clients

  • 0

I have a Rails application with a public REST API which authenticates API clients using SSL client certificates.

I would like the app to act as a simple CA.
Admin users should be able to visit a page on the site and request a new certificate. The application should generate a new SSL cert, signed with the application’s private key, and return it in some form to the admin user.

The admin user will then install this cert in client apps. These apps will then be able to use the new cert to access the REST API.

What is the easiest way of implementing this? The only way I know of generating and signing new certs is with the openssl command line, after configuring openssl as a CA on the server (e.g. like this). Do I need to do that, and communicate with openssl using backticks inside Rails? That seems fiddly and fragile.

How should I return the cert to admins? I could just pass them out the cert as a text file to download. I have seen CA web interfaces which allow users to request a cert from a browser, and then install the cert directly into the browser. The admins would then have to export the cert to pass it to the client scripts.

I don’t suppose there is any kind of “acts_as_CA” gem for Rails?

[Note that I already know how to authenticate client requests against my private key. This question specifically relates to issuing new certs.]

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:34:06+00:00Added an answer on June 13, 2026 at 9:34 am

    I have this working now. The OpenSSL lib in Ruby has all the methods you need for CA work, documented here with clear examples: http://www.ruby-doc.org/stdlib-1.9.3/libdoc/openssl/rdoc/OpenSSL.html

    I didn’t need to set up an OpenSSL CA on the server (as linked in the question above) — that is for using command line openssl as a CA. Using it from Ruby, you need to manage your own CA cert storage, unique serial numbers etc.

    If you want the client certs to be downloadable directly to a browser, offer PCKS12 bundles with a “.p12” file extension.
    See http://www.ruby-doc.org/stdlib-1.9.3/libdoc/openssl/rdoc/OpenSSL/PKCS12.html
    Use a friendly name for the “name” param — this doesn’t affect the DN of your certificate, but it makes it easy to find in the browser’s choose key dialog.
    Don’t include your CA cert in the PKCS12 bundle, Windows will ask the users to install your CA as a fully trusted root CA.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple Rails scaffolded application, and would like to add a bunch
I have a website : http://foo.com I would like to add a rails application
I have a rails application that allows searches using longitude and latitude. I have
I have a rails application with static content in the public directory (e.g. public/index.html
I have a .swf in my rails application, located here: /public/bin/editor/Editor.swf It works fine,
I have a rails application running on Nginx which needs to serve files for
I have a PostgreSQL database for my Rails application. In the schema named 'public'
I have an existing Rails 3 application, to which I am adding a JSON
I'm working on a small Rails application in which I'd like users to be
I have an rails application setup on a linux server which works fine and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.