Provides both XML file and database content authorization implementations for comparison
SknServices — Rails Starter Template
By skoona
A Rails-based authentication and authorization example application that implements content-level permission models using both XML and database approaches.
Explore the design
Compare the page layouts and mobile experience. Open any screenshot for a closer look.
Actual screenshot captured by the server browser.
All pages & views 2
Screenshots show visual appearance; interactive behavior may differ.
What stands out
A quick read of the recorded project description.
Combines TOPIC and CONTENT structures via ContentProfileEntry to describe permissions down to specific documents
The ContentProfile Demo page displays the same user's XML AccessProfile and database ContentProfile side by side
Includes Corporate and Branch Office domain models around protection scenarios for documents such as commission statements
Uses PostgreSQL, and the README states it can run on JRuby
Template Details
SknServices is a Rails application that demonstrates the implementation of Authentication, Access Authorization, and Content Authorization, which the README refers to as UserProfiles, AccessProfiles, and ContentProfiles respectively. The project uses PostgreSQL, the README states it can run on JRuby, and a demo page is provided on GitHub Pages.
Content authorization is the focus of the project. It abstracts protected resources as a Storage Container System (SCS), with the example using a file system: file paths correspond to the TOPIC structure (topic_type, topic_value, description), file names correspond to the CONTENT structure (content_type, content_value, description), and the two combine into a ContentProfileEntry (CPE), which is a content authorization record; multiple CPEs make up a user's ContentProfile and are linked to a UserProfile via person_authentication_key (PAK/UUID).
The same idea has two implementations: the ContentProfile series of classes is the database-based implementation, and the AccessProfile series of classes is the XML file-based implementation, the latter originating from the Java Access Controller permission model and used for access control of pages, clickable items, and flows. The demo page ContentProfile Demo lists system users, and upon selection displays both the user's XML AccessProfile and the matching database ContentProfile for comparison of the two implementations' results.
The project also includes domain models for Corporate and Branch Office, with a business context of protecting documents such as commission statements and recording operational attributes such as the states in which a branch office is approved to underwrite new business. The README states that the database model is the author's preferred approach because it is easier to build interfaces for and maintain when adding new permissions.
Is it right for your project?
Use Cases
- When you need to understand or compare XML and database permission modeling approaches
- When designing fine-grained authorization records for protected content such as documents and statements
- When setting up a starter application with authentication and authorization scaffolding in a Rails project
- When researching how to port the Java Access Controller permission model to Ruby
Suitable For
- Rails developers evaluating content-level authorization solutions
- Backend engineers who need a runnable authentication and authorization example for reference
- Technical teams concerned with the trade-offs between XML and database permission storage
Getting started & customization
Use these recorded setup notes alongside the repository instructions for your chosen version.
- 1
PostgreSQL must be installed first, and database credentials configured in config/settings.yml, config/settings/development.yml (or development.local.yml), and config/settings/test.yml (or test.local.yml)
- 2
Environment variables COVERAGE=true and BUNDLE_PATH='vendor/bundle' can be set; the README notes that using rvm will clear these values and they may need to be set again
- 3
Run mkdir tmp, bin/setup, rspec in sequence, then start with bundle exec rails server Puma -b 0.0.0.0
- 4
The application user ID is in db/seeds.rb; the developer credentials given in the README are developer / developer99
- 5
lib/tasks/profile_tools_task.rake generates the initial version of the content authorization database during bin/setup
License & source material
Usage conditions & limitations
Free to use · keep license noticeThis entry covers the free version under the MIT license in the public repository; the free scope is the code of this version and does not imply that external services or third-party assets are free.
Must comply with when using
- Free use, modification, commercial use, and distribution of this version's code are permitted.
- When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
- The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.
Additional costs & items to verify
- Before use, you must install and run a PostgreSQL database yourself and fill in database credentials in config/settings.yml and other configuration files, otherwise the application cannot start.
- If you use rvm to manage the Ruby environment, it will clear environment variables such as COVERAGE and BUNDLE_PATH, and they must be set again before dependencies can be installed normally.
- The demo account and password come from db/seeds.rb seed data and are for local demonstration only; for production use, replace them with a real user system.
- Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses and cannot be judged solely by the code's MIT license.
- External services such as domains, hosting, databases, payments, or AI may incur additional charges.
View Original Text Basis
Permission is hereby granted, free of charge
Original License Text
You will need to install PostGreSQL, and add/edit PostgreSQL credentials an the Application-Context Configuration YAML files
Original README
export BUNDLE_PATH='vendor/bundle' Note: use of rvm wipes out all these values, you may need to reset them
Original README
https://github.com/skoona/SknServices/blob/master/LICENSEhttps://github.com/skoona/SknServices/blob/master/README.mdApplication UserIDs are in the db/seed.rb file. Developer credentials are: username: developer, passwd: developer99
Original README
Compiled by DeepSeek based on repository license and README ·2026-10-02. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.
Project checks & description sources
Template Information
- Source platforms
- GitHub
- Documentation and maintenance reference score
- Partly documented · 68 / 100
- Technologies
- Rails
- Website type
- Starter
How this score is calculated
Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.
What to verify for this project
- Repository update recorded
- 2022-07-21
- Screenshot last checked
- 2026-10-02
A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.
The catalog identifies Rails as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.
Use a selection guide →How this description was prepared
AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.
Automatically checked against source and license rules; no manual editorial review.
Inspect the recorded source material
SHA-256: c5a0e7543aba61415e28509000824ed7a4ad4e9d0dc467167d6df348830da4f7
2026-10-02T19:04:59.932Z
Source file / repository# SknService
Rails Authorization and Authentication implementation using an alternate MVC strategy.
# Introduction
This is a Rails 5, Ruby 2.3 (JRuby capable), PostgreSQL Application which demonstrates Authentication and Authorization strategies.
My original need was to demonstrate a content authorization methodology, rather than to continue open-ended theoretical discussions. Two
implementaitons would be needed, one based on an existing XML file; modeled after Java's Security Manager and permission. The other implementation would
be a Database driven model that represented the same goal. It is my observation that they both meet my objective, and could both
be used successfully in any application base.
Of the two implementation strategies the database model is my preference, as it would be easier to create a UI to support it and to maintain as new permissions are added. The demonstration
of the final algorithmic result, is the 'ContentProfile Demo' page. It lists all the systems users, and when one is selected it displays
both the XML AccessProfile, and the matching DB ContentProfile.
The algorithm and point being made was: Create a multi-factor authorization/permission record that precisely identifies the business entities a user is assigned to, then precisely identify the
types of content that user is authorized to interact with on behalf of an assigned business entity. I.e For Account number 1104, user UUID can view Commission Document types:96033
After having proven my point, I've decided to share the body of this work and complete it by implementing a Corporate and Branch Office domain model. The initial context of the application
was to provide protection of important business documents like commission statements, and capturing operational attributes like, which states a branch is licensed to quote new business.
Advanced security and authorization features are fully implemented and I think quite usable as a secure starter application.
James,
[more details](https://skoona.blogspot.com/2016/08/sknservices-alternate-development_11.html)

## Description
This application demonstrates and explores methods for Authentication, Access Authorizations,
and Content Authorizations. Referred to as UserProfiles, AccessProfiles, and ContentProfiles in
this application.
* UserProfiles deal with userid, password, password resets, and some preferences management.
* AccessProfiles deal with what each user is allowed to access, click, or view.
* ContentProfiles deal with specific content access privileges; which document, etc. can be retrieved.
UserProfiles and AccessProfiles have many different implementations available, and are well handled processes. The [Java Access Controller](http://www.cs.ait.ac.th/~on/O/oreilly/java-ent/security/ch05_01.htm "Java Access Controller"), and related classes,
were the original template for the AccessRegistry or AccessProfile capability; This now is an enhanced Ruby port of those permission capabilities. However,
ContentProfiles are the main focus of exploration in this app, which has proven to be a significant
engineering challenge when it comes to handling the dynamics of Electronic Delivery.
### Core Idea
#### ContentProfile and AccessProfile are implementations of the same core idea, with side benefits. For lack of a better term: ContentProfile is the label adopted to represent that core idea.
For content authorization there is an assumption that protected resources are classified and stored in some type of storage container system(SCS). An SCS might actually be a simple FileSystem or
a enterprise class document management systems. In any event, retrieving items would require we specify some meta-data to retrieve a single document/item and different meta-data to retrieve a collection of typed documents.
I chose a FileSystem as the SCS for this demo application, so filename implies a specific instance of a thing, and filename with wildcards implies a collection of things, and the file path is identity meta-data.
Filepaths become part of the TOPIC structure, while filenames become part of the CONTENT structure. A ContentProfile entry will have both structures present.
The TOPIC structure is composed of three elements,
- topic_type: :string some type of business entity like a branch, agency, store, etc.
- topic_value: :array-of-strings the identifier for this entity; branch number, agency number, store number, any hard and unique reference.
- description: :string label for this component
The CONTENT structure is composed of three elements,
- content_type: :string textual type of item or document; commission statement, 1099 document, budget spreadsheet, etc.
- content_value: :array-of-strings either the collection name for this type of content, or it's specific ID
- description: :string label for this component
The container for these two structures is defined as a ContentProfileEntry(CPE), which would be composed of these two structures and a descriptive label. CPEs are the final content authorization permission record.
A user is considered to have permission to specific content only if a related CPE exists in their ContentProfile.
One ContentProfileEntry describes one permission, through the combination of a fully qualified content type identifiers and topic type identifiers. It is expected that a
user's collection would have many of these specialized entries, and that some entries may be shareable (reducing redundancy) with other users. Entries
are themselves assigned to a wrapper object called a ContentProfile which maintains a users unique collection.
ContentProfiles are the anchor back to the UserProfile, via the :person_authentication_key(PAK) or UUID they rely on as the primary identifier.
The ContentProfile collection of classes represent the database implementation of this Content Profile strategy.
The AccessProfile collection of classes represent the XML-File implementation of this Content Profile strategy as an extension to it's original role as access authorization for page views, clickables, and process access permissions.
## Installation
Application UserIDs are in the db/seed.rb file. Developer credentials are: username: developer, passwd: developer99
You will need to install PostGreSQL, and add/edit PostgreSQL credentials an the Application-Context Configuration YAML files:
config/settings.yml,
config/settings/development.yml or create and edit config/settings/development.local.yml
config/settings/test.yml or create and edit config/settings/test.local.yml
It might be helpful to set these environment params too:
export COVERAGE=true
export BUNDLE_PATH='vendor/bundle' Note: use of rvm wipes out all these values, you may need to reset them
note: demo userids are documented in the seeds.rb file.
Then execute;
```Bash
$ mkdir tmp
$ bin/setup
$ rspec
$ bundle exec rails server Puma -b 0.0.0.0
```
Also: db/seeds.rb contains test user credentials
lib/tasks/profile_tools_task.rake creates the initial database version of the content profile, during 'bin/setup'
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
## License

Copyright (c) 2015-2016 James Scott, Jr.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Explore similar templates
Compare previews and descriptions within the same stack and category.

react-starter-kit
A full-stack Inertia.js starter with a Rails backend and React + TypeScript frontend, generated by inertia-rails/generator and automatically synced.
Rails · Starter

rails-tabler-starter
A free, open-source Ruby on Rails backend starter using Tabler (Bootstrap 5) with Hotwire/Turbo.
Rails · Admin dashboard

plutonium-core
Plutonium is a Rails-based admin and starter template that uses generators to write CRUD, authentication, authorization, multi-tenancy, portals, search and filtering, and bulk actions directly into project code.
Rails · Admin dashboard

ace-template
Ace Template is a Rails application template applied via rails new, supporting interactive mode and command-line options, with SQLite, Postgres, and MySQL support, Tailwind or Bootstrap styling, and deployment instructions for Kamal, Fly.io, and Heroku.
Rails · Starter

kern
Kern is a Rails engine that provides foundational SaaS features: authentication and user settings based on Rails' authentication generator, multi-tenancy via Workspace and Member with multiple Roles, team invitations, Stripe subscription billing configured through plans.yml and credentials, plus a form builder, basic…
Rails · SaaS

rails-react-starter
Rails React Starter is an MIT-licensed starter that pairs a Rails JSON API backend with a React frontend, including TailwindCSS and Docker configuration.
Rails · Starter
