mirror of
https://github.com/Lakr233/GitLab-License-Generator.git
synced 2026-02-07 22:25:36 +02:00
updated validation
This commit is contained in:
@@ -1,408 +1,7 @@
|
|||||||
require 'openssl'
|
require_relative 'lib/license.rb'
|
||||||
require 'date'
|
|
||||||
require 'json'
|
|
||||||
require 'base64'
|
|
||||||
|
|
||||||
module Gitlab
|
|
||||||
class License
|
|
||||||
VERSION = '2.1.0'.freeze
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
module Gitlab
|
|
||||||
class License
|
|
||||||
class Encryptor
|
|
||||||
class Error < StandardError; end
|
|
||||||
class KeyError < Error; end
|
|
||||||
class DecryptionError < Error; end
|
|
||||||
|
|
||||||
attr_accessor :key
|
|
||||||
|
|
||||||
def initialize(key)
|
|
||||||
raise KeyError, 'No RSA encryption key provided.' if key && !key.is_a?(OpenSSL::PKey::RSA)
|
|
||||||
|
|
||||||
@key = key
|
|
||||||
end
|
|
||||||
|
|
||||||
def encrypt(data)
|
|
||||||
raise KeyError, 'Provided key is not a private key.' unless key.private?
|
|
||||||
|
|
||||||
# Encrypt the data using symmetric AES encryption.
|
|
||||||
cipher = OpenSSL::Cipher::AES128.new(:CBC)
|
|
||||||
cipher.encrypt
|
|
||||||
aes_key = cipher.random_key
|
|
||||||
aes_iv = cipher.random_iv
|
|
||||||
|
|
||||||
encrypted_data = cipher.update(data) + cipher.final
|
|
||||||
|
|
||||||
# Encrypt the AES key using asymmetric RSA encryption.
|
|
||||||
encrypted_key = key.private_encrypt(aes_key)
|
|
||||||
|
|
||||||
encryption_data = {
|
|
||||||
'data' => Base64.encode64(encrypted_data),
|
|
||||||
'key' => Base64.encode64(encrypted_key),
|
|
||||||
'iv' => Base64.encode64(aes_iv)
|
|
||||||
}
|
|
||||||
|
|
||||||
json_data = JSON.dump(encryption_data)
|
|
||||||
Base64.encode64(json_data)
|
|
||||||
end
|
|
||||||
|
|
||||||
def decrypt(data)
|
|
||||||
raise KeyError, 'Provided key is not a public key.' unless key.public?
|
|
||||||
|
|
||||||
json_data = Base64.decode64(data.chomp)
|
|
||||||
|
|
||||||
begin
|
|
||||||
encryption_data = JSON.parse(json_data)
|
|
||||||
rescue JSON::ParserError
|
|
||||||
raise DecryptionError, 'Encryption data is invalid JSON.'
|
|
||||||
end
|
|
||||||
|
|
||||||
unless %w[data key iv].all? { |key| encryption_data[key] }
|
|
||||||
raise DecryptionError, 'Required field missing from encryption data.'
|
|
||||||
end
|
|
||||||
|
|
||||||
encrypted_data = Base64.decode64(encryption_data['data'])
|
|
||||||
encrypted_key = Base64.decode64(encryption_data['key'])
|
|
||||||
aes_iv = Base64.decode64(encryption_data['iv'])
|
|
||||||
|
|
||||||
begin
|
|
||||||
# Decrypt the AES key using asymmetric RSA encryption.
|
|
||||||
aes_key = self.key.public_decrypt(encrypted_key)
|
|
||||||
rescue OpenSSL::PKey::RSAError
|
|
||||||
raise DecryptionError, 'AES encryption key could not be decrypted.'
|
|
||||||
end
|
|
||||||
|
|
||||||
# Decrypt the data using symmetric AES encryption.
|
|
||||||
cipher = OpenSSL::Cipher::AES128.new(:CBC)
|
|
||||||
cipher.decrypt
|
|
||||||
|
|
||||||
begin
|
|
||||||
cipher.key = aes_key
|
|
||||||
rescue OpenSSL::Cipher::CipherError
|
|
||||||
raise DecryptionError, 'AES encryption key is invalid.'
|
|
||||||
end
|
|
||||||
|
|
||||||
begin
|
|
||||||
cipher.iv = aes_iv
|
|
||||||
rescue OpenSSL::Cipher::CipherError
|
|
||||||
raise DecryptionError, 'AES IV is invalid.'
|
|
||||||
end
|
|
||||||
|
|
||||||
begin
|
|
||||||
data = cipher.update(encrypted_data) + cipher.final
|
|
||||||
rescue OpenSSL::Cipher::CipherError
|
|
||||||
raise DecryptionError, 'Data could not be decrypted.'
|
|
||||||
end
|
|
||||||
|
|
||||||
data
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
module Gitlab
|
|
||||||
class License
|
|
||||||
module Boundary
|
|
||||||
BOUNDARY_START = /(\A|\r?\n)-*BEGIN .+? LICENSE-*\r?\n/.freeze
|
|
||||||
BOUNDARY_END = /\r?\n-*END .+? LICENSE-*(\r?\n|\z)/.freeze
|
|
||||||
|
|
||||||
class << self
|
|
||||||
def add_boundary(data, product_name)
|
|
||||||
data = remove_boundary(data)
|
|
||||||
|
|
||||||
product_name.upcase!
|
|
||||||
|
|
||||||
pad = lambda do |message, width|
|
|
||||||
total_padding = [width - message.length, 0].max
|
|
||||||
|
|
||||||
padding = total_padding / 2.0
|
|
||||||
[
|
|
||||||
'-' * padding.ceil,
|
|
||||||
message,
|
|
||||||
'-' * padding.floor
|
|
||||||
].join
|
|
||||||
end
|
|
||||||
|
|
||||||
[
|
|
||||||
pad.call("BEGIN #{product_name} LICENSE", 60),
|
|
||||||
data.strip,
|
|
||||||
pad.call("END #{product_name} LICENSE", 60)
|
|
||||||
].join("\n")
|
|
||||||
end
|
|
||||||
|
|
||||||
def remove_boundary(data)
|
|
||||||
after_boundary = data.split(BOUNDARY_START).last
|
|
||||||
in_boundary = after_boundary.split(BOUNDARY_END).first
|
|
||||||
|
|
||||||
in_boundary
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
module Gitlab
|
|
||||||
class License
|
|
||||||
class Error < StandardError; end
|
|
||||||
class ImportError < Error; end
|
|
||||||
class ValidationError < Error; end
|
|
||||||
|
|
||||||
class << self
|
|
||||||
attr_reader :encryption_key
|
|
||||||
@encryption_key = nil
|
|
||||||
|
|
||||||
def encryption_key=(key)
|
|
||||||
raise ArgumentError, 'No RSA encryption key provided.' if key && !key.is_a?(OpenSSL::PKey::RSA)
|
|
||||||
|
|
||||||
@encryption_key = key
|
|
||||||
@encryptor = nil
|
|
||||||
end
|
|
||||||
|
|
||||||
def encryptor
|
|
||||||
@encryptor ||= Encryptor.new(encryption_key)
|
|
||||||
end
|
|
||||||
|
|
||||||
def import(data)
|
|
||||||
raise ImportError, 'No license data.' if data.nil?
|
|
||||||
|
|
||||||
data = Boundary.remove_boundary(data)
|
|
||||||
|
|
||||||
begin
|
|
||||||
license_json = encryptor.decrypt(data)
|
|
||||||
rescue Encryptor::Error
|
|
||||||
raise ImportError, 'License data could not be decrypted.'
|
|
||||||
end
|
|
||||||
|
|
||||||
begin
|
|
||||||
attributes = JSON.parse(license_json)
|
|
||||||
rescue JSON::ParseError
|
|
||||||
raise ImportError, 'License data is invalid JSON.'
|
|
||||||
end
|
|
||||||
|
|
||||||
new(attributes)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
attr_reader :version
|
|
||||||
attr_accessor :licensee, :starts_at, :expires_at, :notify_admins_at,
|
|
||||||
:notify_users_at, :block_changes_at, :last_synced_at, :next_sync_at,
|
|
||||||
:activated_at, :restrictions, :cloud_licensing_enabled,
|
|
||||||
:offline_cloud_licensing_enabled, :auto_renew_enabled, :seat_reconciliation_enabled,
|
|
||||||
:operational_metrics_enabled, :generated_from_customers_dot
|
|
||||||
|
|
||||||
alias_method :issued_at, :starts_at
|
|
||||||
alias_method :issued_at=, :starts_at=
|
|
||||||
|
|
||||||
def initialize(attributes = {})
|
|
||||||
load_attributes(attributes)
|
|
||||||
end
|
|
||||||
|
|
||||||
def valid?
|
|
||||||
if !licensee || !licensee.is_a?(Hash) || licensee.empty?
|
|
||||||
false
|
|
||||||
elsif !starts_at || !starts_at.is_a?(Date)
|
|
||||||
false
|
|
||||||
elsif expires_at && !expires_at.is_a?(Date)
|
|
||||||
false
|
|
||||||
elsif notify_admins_at && !notify_admins_at.is_a?(Date)
|
|
||||||
false
|
|
||||||
elsif notify_users_at && !notify_users_at.is_a?(Date)
|
|
||||||
false
|
|
||||||
elsif block_changes_at && !block_changes_at.is_a?(Date)
|
|
||||||
false
|
|
||||||
elsif last_synced_at && !last_synced_at.is_a?(DateTime)
|
|
||||||
false
|
|
||||||
elsif next_sync_at && !next_sync_at.is_a?(DateTime)
|
|
||||||
false
|
|
||||||
elsif activated_at && !activated_at.is_a?(DateTime)
|
|
||||||
false
|
|
||||||
elsif restrictions && !restrictions.is_a?(Hash)
|
|
||||||
false
|
|
||||||
elsif !cloud_licensing? && offline_cloud_licensing?
|
|
||||||
false
|
|
||||||
else
|
|
||||||
true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def validate!
|
|
||||||
raise ValidationError, 'License is invalid' unless valid?
|
|
||||||
end
|
|
||||||
|
|
||||||
def will_expire?
|
|
||||||
expires_at
|
|
||||||
end
|
|
||||||
|
|
||||||
def will_notify_admins?
|
|
||||||
notify_admins_at
|
|
||||||
end
|
|
||||||
|
|
||||||
def will_notify_users?
|
|
||||||
notify_users_at
|
|
||||||
end
|
|
||||||
|
|
||||||
def will_block_changes?
|
|
||||||
block_changes_at
|
|
||||||
end
|
|
||||||
|
|
||||||
def will_sync?
|
|
||||||
next_sync_at
|
|
||||||
end
|
|
||||||
|
|
||||||
def activated?
|
|
||||||
activated_at
|
|
||||||
end
|
|
||||||
|
|
||||||
def expired?
|
|
||||||
will_expire? && Date.today >= expires_at
|
|
||||||
end
|
|
||||||
|
|
||||||
def notify_admins?
|
|
||||||
will_notify_admins? && Date.today >= notify_admins_at
|
|
||||||
end
|
|
||||||
|
|
||||||
def notify_users?
|
|
||||||
will_notify_users? && Date.today >= notify_users_at
|
|
||||||
end
|
|
||||||
|
|
||||||
def block_changes?
|
|
||||||
will_block_changes? && Date.today >= block_changes_at
|
|
||||||
end
|
|
||||||
|
|
||||||
def cloud_licensing?
|
|
||||||
cloud_licensing_enabled == true
|
|
||||||
end
|
|
||||||
|
|
||||||
def offline_cloud_licensing?
|
|
||||||
offline_cloud_licensing_enabled == true
|
|
||||||
end
|
|
||||||
|
|
||||||
def auto_renew?
|
|
||||||
auto_renew_enabled == true
|
|
||||||
end
|
|
||||||
|
|
||||||
def seat_reconciliation?
|
|
||||||
seat_reconciliation_enabled == true
|
|
||||||
end
|
|
||||||
|
|
||||||
def operational_metrics?
|
|
||||||
operational_metrics_enabled == true
|
|
||||||
end
|
|
||||||
|
|
||||||
def generated_from_customers_dot?
|
|
||||||
generated_from_customers_dot == true
|
|
||||||
end
|
|
||||||
|
|
||||||
def restricted?(key = nil)
|
|
||||||
if key
|
|
||||||
restricted? && restrictions.has_key?(key)
|
|
||||||
else
|
|
||||||
restrictions && restrictions.length >= 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def attributes
|
|
||||||
hash = {}
|
|
||||||
|
|
||||||
hash['version'] = version
|
|
||||||
hash['licensee'] = licensee
|
|
||||||
|
|
||||||
hash['issued_at'] = starts_at
|
|
||||||
hash['expires_at'] = expires_at if will_expire?
|
|
||||||
|
|
||||||
hash['notify_admins_at'] = notify_admins_at if will_notify_admins?
|
|
||||||
hash['notify_users_at'] = notify_users_at if will_notify_users?
|
|
||||||
hash['block_changes_at'] = block_changes_at if will_block_changes?
|
|
||||||
|
|
||||||
hash['next_sync_at'] = next_sync_at if will_sync?
|
|
||||||
hash['last_synced_at'] = last_synced_at if will_sync?
|
|
||||||
hash['activated_at'] = activated_at if activated?
|
|
||||||
|
|
||||||
hash['cloud_licensing_enabled'] = cloud_licensing?
|
|
||||||
hash['offline_cloud_licensing_enabled'] = offline_cloud_licensing?
|
|
||||||
hash['auto_renew_enabled'] = auto_renew?
|
|
||||||
hash['seat_reconciliation_enabled'] = seat_reconciliation?
|
|
||||||
hash['operational_metrics_enabled'] = operational_metrics?
|
|
||||||
|
|
||||||
hash['generated_from_customers_dot'] = generated_from_customers_dot?
|
|
||||||
|
|
||||||
hash['restrictions'] = restrictions if restricted?
|
|
||||||
|
|
||||||
hash
|
|
||||||
end
|
|
||||||
|
|
||||||
def to_json(*_args)
|
|
||||||
JSON.dump(attributes)
|
|
||||||
end
|
|
||||||
|
|
||||||
def export(boundary: nil)
|
|
||||||
validate!
|
|
||||||
|
|
||||||
puts to_json
|
|
||||||
|
|
||||||
data = self.class.encryptor.encrypt(to_json)
|
|
||||||
|
|
||||||
data = Boundary.add_boundary(data, boundary) if boundary
|
|
||||||
|
|
||||||
data
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def load_attributes(attributes)
|
|
||||||
attributes = attributes.transform_keys(&:to_s)
|
|
||||||
|
|
||||||
version = attributes['version'] || 1
|
|
||||||
raise ArgumentError, 'Version is too new' unless version && version == 1
|
|
||||||
|
|
||||||
@version = version
|
|
||||||
|
|
||||||
@licensee = attributes['licensee']
|
|
||||||
|
|
||||||
%w[issued_at expires_at notify_admins_at notify_users_at block_changes_at].each do |attr_name|
|
|
||||||
set_date_attribute(attr_name, attributes[attr_name])
|
|
||||||
end
|
|
||||||
|
|
||||||
%w[last_synced_at next_sync_at activated_at].each do |attr_name|
|
|
||||||
set_datetime_attribute(attr_name, attributes[attr_name])
|
|
||||||
end
|
|
||||||
|
|
||||||
%w[
|
|
||||||
cloud_licensing_enabled
|
|
||||||
offline_cloud_licensing_enabled
|
|
||||||
auto_renew_enabled
|
|
||||||
seat_reconciliation_enabled
|
|
||||||
operational_metrics_enabled
|
|
||||||
generated_from_customers_dot
|
|
||||||
].each do |attr_name|
|
|
||||||
public_send("#{attr_name}=", attributes[attr_name] == true)
|
|
||||||
end
|
|
||||||
|
|
||||||
restrictions = attributes['restrictions']
|
|
||||||
if restrictions&.is_a?(Hash)
|
|
||||||
restrictions = restrictions.transform_keys(&:to_sym)
|
|
||||||
@restrictions = restrictions
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def set_date_attribute(attr_name, value, date_class = Date)
|
|
||||||
value = date_class.parse(value) rescue nil if value.is_a?(String)
|
|
||||||
|
|
||||||
return unless value
|
|
||||||
|
|
||||||
public_send("#{attr_name}=", value)
|
|
||||||
end
|
|
||||||
|
|
||||||
def set_datetime_attribute(attr_name, value)
|
|
||||||
set_date_attribute(attr_name, value, DateTime)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# MARK: GENERATOR
|
# MARK: GENERATOR
|
||||||
|
#
|
||||||
if !File.file?("license_key") || !File.file?("license_key.pub")
|
if !File.file?("license_key") || !File.file?("license_key.pub")
|
||||||
puts "License key not found"
|
puts "License key not found"
|
||||||
puts "Generate a RSA key pair using generate_keys.rb"
|
puts "Generate a RSA key pair using generate_keys.rb"
|
||||||
@@ -417,15 +16,16 @@ Gitlab::License.encryption_key = private_key
|
|||||||
license = Gitlab::License.new
|
license = Gitlab::License.new
|
||||||
|
|
||||||
license.licensee = {
|
license.licensee = {
|
||||||
"Name" => "GitLab Inc.",
|
"Name" => "Tim Cook",
|
||||||
"Company" => "GitLab Inc.",
|
"Company" => "Apple Computer, Inc.",
|
||||||
"Email" => "support@gitlab.com"
|
"Email" => "tcook@apple.com"
|
||||||
}
|
}
|
||||||
|
|
||||||
license.starts_at = Date.new(2000, 1, 1)
|
license.starts_at = Date.new(1976, 4, 1)
|
||||||
license.restrictions = {
|
license.expires_at = Date.new(8848, 4, 1)
|
||||||
|
license.restrictions = {
|
||||||
plan: 'Ultimate',
|
plan: 'Ultimate',
|
||||||
active_user_count: 100000000,
|
active_user_count: 1145141919810,
|
||||||
}
|
}
|
||||||
|
|
||||||
data = license.export
|
data = license.export
|
||||||
|
|||||||
291
lib/license.rb
Normal file
291
lib/license.rb
Normal file
@@ -0,0 +1,291 @@
|
|||||||
|
require 'openssl'
|
||||||
|
require 'date'
|
||||||
|
require 'json'
|
||||||
|
require 'base64'
|
||||||
|
|
||||||
|
require_relative 'license/version'
|
||||||
|
require_relative 'license/encryptor'
|
||||||
|
require_relative 'license/boundary'
|
||||||
|
|
||||||
|
module Gitlab
|
||||||
|
class License
|
||||||
|
class Error < StandardError; end
|
||||||
|
class ImportError < Error; end
|
||||||
|
class ValidationError < Error; end
|
||||||
|
|
||||||
|
class << self
|
||||||
|
attr_reader :encryption_key
|
||||||
|
@encryption_key = nil
|
||||||
|
|
||||||
|
def encryption_key=(key)
|
||||||
|
raise ArgumentError, 'No RSA encryption key provided.' if key && !key.is_a?(OpenSSL::PKey::RSA)
|
||||||
|
|
||||||
|
@encryption_key = key
|
||||||
|
@encryptor = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
def encryptor
|
||||||
|
@encryptor ||= Encryptor.new(encryption_key)
|
||||||
|
end
|
||||||
|
|
||||||
|
def import(data)
|
||||||
|
raise ImportError, 'No license data.' if data.nil?
|
||||||
|
|
||||||
|
data = Boundary.remove_boundary(data)
|
||||||
|
|
||||||
|
begin
|
||||||
|
license_json = encryptor.decrypt(data)
|
||||||
|
rescue Encryptor::Error
|
||||||
|
raise ImportError, 'License data could not be decrypted.'
|
||||||
|
end
|
||||||
|
|
||||||
|
begin
|
||||||
|
attributes = JSON.parse(license_json)
|
||||||
|
rescue JSON::ParseError
|
||||||
|
raise ImportError, 'License data is invalid JSON.'
|
||||||
|
end
|
||||||
|
|
||||||
|
new(attributes)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
attr_reader :version
|
||||||
|
attr_accessor :licensee, :starts_at, :expires_at, :notify_admins_at,
|
||||||
|
:notify_users_at, :block_changes_at, :last_synced_at, :next_sync_at,
|
||||||
|
:activated_at, :restrictions, :cloud_licensing_enabled,
|
||||||
|
:offline_cloud_licensing_enabled, :auto_renew_enabled, :seat_reconciliation_enabled,
|
||||||
|
:operational_metrics_enabled, :generated_from_customers_dot
|
||||||
|
|
||||||
|
alias_method :issued_at, :starts_at
|
||||||
|
alias_method :issued_at=, :starts_at=
|
||||||
|
|
||||||
|
def initialize(attributes = {})
|
||||||
|
load_attributes(attributes)
|
||||||
|
end
|
||||||
|
|
||||||
|
def valid?
|
||||||
|
if !licensee || !licensee.is_a?(Hash) || licensee.empty?
|
||||||
|
puts "Invalid License - licensee is not a hash or is empty"
|
||||||
|
false
|
||||||
|
elsif !starts_at || !starts_at.is_a?(Date)
|
||||||
|
puts "Invalid License - starts_at is not a date"
|
||||||
|
false
|
||||||
|
elsif !expires_at && !gl_team_license? && !jh_team_license?
|
||||||
|
puts "Invalid License - expires_at is not a date"
|
||||||
|
false
|
||||||
|
elsif expires_at && !expires_at.is_a?(Date)
|
||||||
|
puts "Invalid License - expires_at is not a date"
|
||||||
|
false
|
||||||
|
elsif notify_admins_at && !notify_admins_at.is_a?(Date)
|
||||||
|
puts "Invalid License - notify_admins_at is not a date"
|
||||||
|
false
|
||||||
|
elsif notify_users_at && !notify_users_at.is_a?(Date)
|
||||||
|
puts "Invalid License - notify_users_at is not a date"
|
||||||
|
false
|
||||||
|
elsif block_changes_at && !block_changes_at.is_a?(Date)
|
||||||
|
puts "Invalid License - block_changes_at is not a date"
|
||||||
|
false
|
||||||
|
elsif last_synced_at && !last_synced_at.is_a?(DateTime)
|
||||||
|
puts "Invalid License - last_synced_at is not a datetime"
|
||||||
|
false
|
||||||
|
elsif next_sync_at && !next_sync_at.is_a?(DateTime)
|
||||||
|
puts "Invalid License - next_sync_at is not a datetime"
|
||||||
|
false
|
||||||
|
elsif activated_at && !activated_at.is_a?(DateTime)
|
||||||
|
puts "Invalid License - activated_at is not a datetime"
|
||||||
|
false
|
||||||
|
elsif restrictions && !restrictions.is_a?(Hash)
|
||||||
|
puts "Invalid License - restrictions is not a hash"
|
||||||
|
false
|
||||||
|
elsif !cloud_licensing? && offline_cloud_licensing?
|
||||||
|
puts "Invalid License - offline_cloud_licensing_enabled is true but cloud_licensing_enabled is false"
|
||||||
|
false
|
||||||
|
else
|
||||||
|
puts "License is valid"
|
||||||
|
true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def validate!
|
||||||
|
raise ValidationError, 'License is invalid' unless valid?
|
||||||
|
end
|
||||||
|
|
||||||
|
def will_expire?
|
||||||
|
expires_at
|
||||||
|
end
|
||||||
|
|
||||||
|
def will_notify_admins?
|
||||||
|
notify_admins_at
|
||||||
|
end
|
||||||
|
|
||||||
|
def will_notify_users?
|
||||||
|
notify_users_at
|
||||||
|
end
|
||||||
|
|
||||||
|
def will_block_changes?
|
||||||
|
block_changes_at
|
||||||
|
end
|
||||||
|
|
||||||
|
def will_sync?
|
||||||
|
next_sync_at
|
||||||
|
end
|
||||||
|
|
||||||
|
def activated?
|
||||||
|
activated_at
|
||||||
|
end
|
||||||
|
|
||||||
|
def expired?
|
||||||
|
will_expire? && Date.today >= expires_at
|
||||||
|
end
|
||||||
|
|
||||||
|
def notify_admins?
|
||||||
|
will_notify_admins? && Date.today >= notify_admins_at
|
||||||
|
end
|
||||||
|
|
||||||
|
def notify_users?
|
||||||
|
will_notify_users? && Date.today >= notify_users_at
|
||||||
|
end
|
||||||
|
|
||||||
|
def block_changes?
|
||||||
|
will_block_changes? && Date.today >= block_changes_at
|
||||||
|
end
|
||||||
|
|
||||||
|
def cloud_licensing?
|
||||||
|
cloud_licensing_enabled == true
|
||||||
|
end
|
||||||
|
|
||||||
|
def offline_cloud_licensing?
|
||||||
|
offline_cloud_licensing_enabled == true
|
||||||
|
end
|
||||||
|
|
||||||
|
def auto_renew?
|
||||||
|
auto_renew_enabled == true
|
||||||
|
end
|
||||||
|
|
||||||
|
def seat_reconciliation?
|
||||||
|
seat_reconciliation_enabled == true
|
||||||
|
end
|
||||||
|
|
||||||
|
def operational_metrics?
|
||||||
|
operational_metrics_enabled == true
|
||||||
|
end
|
||||||
|
|
||||||
|
def generated_from_customers_dot?
|
||||||
|
generated_from_customers_dot == true
|
||||||
|
end
|
||||||
|
|
||||||
|
def gl_team_license?
|
||||||
|
licensee['Company'].to_s.match?(/GitLab/i) && licensee['Email'].to_s.end_with?('@gitlab.com')
|
||||||
|
end
|
||||||
|
|
||||||
|
def jh_team_license?
|
||||||
|
licensee['Company'].to_s.match?(/GitLab/i) && licensee['Email'].to_s.end_with?('@jihulab.com')
|
||||||
|
end
|
||||||
|
|
||||||
|
def restricted?(key = nil)
|
||||||
|
if key
|
||||||
|
restricted? && restrictions.has_key?(key)
|
||||||
|
else
|
||||||
|
restrictions && restrictions.length >= 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def attributes
|
||||||
|
hash = {}
|
||||||
|
|
||||||
|
hash['version'] = version
|
||||||
|
hash['licensee'] = licensee
|
||||||
|
|
||||||
|
# `issued_at` is the legacy name for starts_at.
|
||||||
|
# TODO: Move to starts_at in a next version.
|
||||||
|
hash['issued_at'] = starts_at
|
||||||
|
hash['expires_at'] = expires_at if will_expire?
|
||||||
|
|
||||||
|
hash['notify_admins_at'] = notify_admins_at if will_notify_admins?
|
||||||
|
hash['notify_users_at'] = notify_users_at if will_notify_users?
|
||||||
|
hash['block_changes_at'] = block_changes_at if will_block_changes?
|
||||||
|
|
||||||
|
hash['next_sync_at'] = next_sync_at if will_sync?
|
||||||
|
hash['last_synced_at'] = last_synced_at if will_sync?
|
||||||
|
hash['activated_at'] = activated_at if activated?
|
||||||
|
|
||||||
|
hash['cloud_licensing_enabled'] = cloud_licensing?
|
||||||
|
hash['offline_cloud_licensing_enabled'] = offline_cloud_licensing?
|
||||||
|
hash['auto_renew_enabled'] = auto_renew?
|
||||||
|
hash['seat_reconciliation_enabled'] = seat_reconciliation?
|
||||||
|
hash['operational_metrics_enabled'] = operational_metrics?
|
||||||
|
|
||||||
|
hash['generated_from_customers_dot'] = generated_from_customers_dot?
|
||||||
|
|
||||||
|
hash['restrictions'] = restrictions if restricted?
|
||||||
|
|
||||||
|
hash
|
||||||
|
end
|
||||||
|
|
||||||
|
def to_json(*_args)
|
||||||
|
JSON.dump(attributes)
|
||||||
|
end
|
||||||
|
|
||||||
|
def export(boundary: nil)
|
||||||
|
validate!
|
||||||
|
|
||||||
|
data = self.class.encryptor.encrypt(to_json)
|
||||||
|
|
||||||
|
data = Boundary.add_boundary(data, boundary) if boundary
|
||||||
|
|
||||||
|
data
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def load_attributes(attributes)
|
||||||
|
attributes = attributes.transform_keys(&:to_s)
|
||||||
|
|
||||||
|
version = attributes['version'] || 1
|
||||||
|
raise ArgumentError, 'Version is too new' unless version && version == 1
|
||||||
|
|
||||||
|
@version = version
|
||||||
|
|
||||||
|
@licensee = attributes['licensee']
|
||||||
|
|
||||||
|
# `issued_at` is the legacy name for starts_at.
|
||||||
|
# TODO: Move to starts_at in a next version.
|
||||||
|
%w[issued_at expires_at notify_admins_at notify_users_at block_changes_at].each do |attr_name|
|
||||||
|
set_date_attribute(attr_name, attributes[attr_name])
|
||||||
|
end
|
||||||
|
|
||||||
|
%w[last_synced_at next_sync_at activated_at].each do |attr_name|
|
||||||
|
set_datetime_attribute(attr_name, attributes[attr_name])
|
||||||
|
end
|
||||||
|
|
||||||
|
%w[
|
||||||
|
cloud_licensing_enabled
|
||||||
|
offline_cloud_licensing_enabled
|
||||||
|
auto_renew_enabled
|
||||||
|
seat_reconciliation_enabled
|
||||||
|
operational_metrics_enabled
|
||||||
|
generated_from_customers_dot
|
||||||
|
].each do |attr_name|
|
||||||
|
public_send("#{attr_name}=", attributes[attr_name] == true)
|
||||||
|
end
|
||||||
|
|
||||||
|
restrictions = attributes['restrictions']
|
||||||
|
if restrictions&.is_a?(Hash)
|
||||||
|
restrictions = restrictions.transform_keys(&:to_sym)
|
||||||
|
@restrictions = restrictions
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def set_date_attribute(attr_name, value, date_class = Date)
|
||||||
|
value = date_class.parse(value) rescue nil if value.is_a?(String)
|
||||||
|
|
||||||
|
return unless value
|
||||||
|
|
||||||
|
public_send("#{attr_name}=", value)
|
||||||
|
end
|
||||||
|
|
||||||
|
def set_datetime_attribute(attr_name, value)
|
||||||
|
set_date_attribute(attr_name, value, DateTime)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
40
lib/license/boundary.rb
Normal file
40
lib/license/boundary.rb
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
module Gitlab
|
||||||
|
class License
|
||||||
|
module Boundary
|
||||||
|
BOUNDARY_START = /(\A|\r?\n)-*BEGIN .+? LICENSE-*\r?\n/.freeze
|
||||||
|
BOUNDARY_END = /\r?\n-*END .+? LICENSE-*(\r?\n|\z)/.freeze
|
||||||
|
|
||||||
|
class << self
|
||||||
|
def add_boundary(data, product_name)
|
||||||
|
data = remove_boundary(data)
|
||||||
|
|
||||||
|
product_name.upcase!
|
||||||
|
|
||||||
|
pad = lambda do |message, width|
|
||||||
|
total_padding = [width - message.length, 0].max
|
||||||
|
|
||||||
|
padding = total_padding / 2.0
|
||||||
|
[
|
||||||
|
'-' * padding.ceil,
|
||||||
|
message,
|
||||||
|
'-' * padding.floor
|
||||||
|
].join
|
||||||
|
end
|
||||||
|
|
||||||
|
[
|
||||||
|
pad.call("BEGIN #{product_name} LICENSE", 60),
|
||||||
|
data.strip,
|
||||||
|
pad.call("END #{product_name} LICENSE", 60)
|
||||||
|
].join("\n")
|
||||||
|
end
|
||||||
|
|
||||||
|
def remove_boundary(data)
|
||||||
|
after_boundary = data.split(BOUNDARY_START).last
|
||||||
|
in_boundary = after_boundary.split(BOUNDARY_END).first
|
||||||
|
|
||||||
|
in_boundary
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
92
lib/license/encryptor.rb
Normal file
92
lib/license/encryptor.rb
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
module Gitlab
|
||||||
|
class License
|
||||||
|
class Encryptor
|
||||||
|
class Error < StandardError; end
|
||||||
|
class KeyError < Error; end
|
||||||
|
class DecryptionError < Error; end
|
||||||
|
|
||||||
|
attr_accessor :key
|
||||||
|
|
||||||
|
def initialize(key)
|
||||||
|
raise KeyError, 'No RSA encryption key provided.' if key && !key.is_a?(OpenSSL::PKey::RSA)
|
||||||
|
|
||||||
|
@key = key
|
||||||
|
end
|
||||||
|
|
||||||
|
def encrypt(data)
|
||||||
|
raise KeyError, 'Provided key is not a private key.' unless key.private?
|
||||||
|
|
||||||
|
# Encrypt the data using symmetric AES encryption.
|
||||||
|
cipher = OpenSSL::Cipher::AES128.new(:CBC)
|
||||||
|
cipher.encrypt
|
||||||
|
aes_key = cipher.random_key
|
||||||
|
aes_iv = cipher.random_iv
|
||||||
|
|
||||||
|
encrypted_data = cipher.update(data) + cipher.final
|
||||||
|
|
||||||
|
# Encrypt the AES key using asymmetric RSA encryption.
|
||||||
|
encrypted_key = key.private_encrypt(aes_key)
|
||||||
|
|
||||||
|
encryption_data = {
|
||||||
|
'data' => Base64.encode64(encrypted_data),
|
||||||
|
'key' => Base64.encode64(encrypted_key),
|
||||||
|
'iv' => Base64.encode64(aes_iv)
|
||||||
|
}
|
||||||
|
|
||||||
|
json_data = JSON.dump(encryption_data)
|
||||||
|
Base64.encode64(json_data)
|
||||||
|
end
|
||||||
|
|
||||||
|
def decrypt(data)
|
||||||
|
raise KeyError, 'Provided key is not a public key.' unless key.public?
|
||||||
|
|
||||||
|
json_data = Base64.decode64(data.chomp)
|
||||||
|
|
||||||
|
begin
|
||||||
|
encryption_data = JSON.parse(json_data)
|
||||||
|
rescue JSON::ParserError
|
||||||
|
raise DecryptionError, 'Encryption data is invalid JSON.'
|
||||||
|
end
|
||||||
|
|
||||||
|
unless %w[data key iv].all? { |key| encryption_data[key] }
|
||||||
|
raise DecryptionError, 'Required field missing from encryption data.'
|
||||||
|
end
|
||||||
|
|
||||||
|
encrypted_data = Base64.decode64(encryption_data['data'])
|
||||||
|
encrypted_key = Base64.decode64(encryption_data['key'])
|
||||||
|
aes_iv = Base64.decode64(encryption_data['iv'])
|
||||||
|
|
||||||
|
begin
|
||||||
|
# Decrypt the AES key using asymmetric RSA encryption.
|
||||||
|
aes_key = self.key.public_decrypt(encrypted_key)
|
||||||
|
rescue OpenSSL::PKey::RSAError
|
||||||
|
raise DecryptionError, 'AES encryption key could not be decrypted.'
|
||||||
|
end
|
||||||
|
|
||||||
|
# Decrypt the data using symmetric AES encryption.
|
||||||
|
cipher = OpenSSL::Cipher::AES128.new(:CBC)
|
||||||
|
cipher.decrypt
|
||||||
|
|
||||||
|
begin
|
||||||
|
cipher.key = aes_key
|
||||||
|
rescue OpenSSL::Cipher::CipherError
|
||||||
|
raise DecryptionError, 'AES encryption key is invalid.'
|
||||||
|
end
|
||||||
|
|
||||||
|
begin
|
||||||
|
cipher.iv = aes_iv
|
||||||
|
rescue OpenSSL::Cipher::CipherError
|
||||||
|
raise DecryptionError, 'AES IV is invalid.'
|
||||||
|
end
|
||||||
|
|
||||||
|
begin
|
||||||
|
data = cipher.update(encrypted_data) + cipher.final
|
||||||
|
rescue OpenSSL::Cipher::CipherError
|
||||||
|
raise DecryptionError, 'Data could not be decrypted.'
|
||||||
|
end
|
||||||
|
|
||||||
|
data
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
5
lib/license/version.rb
Normal file
5
lib/license/version.rb
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
module Gitlab
|
||||||
|
class License
|
||||||
|
VERSION = '2.2.1'.freeze
|
||||||
|
end
|
||||||
|
end
|
||||||
50
license_key
50
license_key
@@ -1,27 +1,27 @@
|
|||||||
-----BEGIN RSA PRIVATE KEY-----
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
MIIEowIBAAKCAQEAud4kAhXh7dQg9qlhqbwUd1wrknf06vrT2Wc72lhag5jMtWSs
|
MIIEowIBAAKCAQEAreEfP/ncA1A5cuxBz7rS0Z9DDxdSymLwt2OUSM5WJa+dVB3z
|
||||||
HWEC817zNOTNkev3q6RYXUO0cm+fcZsO4g3Iy4ZbM9s5kXY1jDaM4Mc6JCehO7o1
|
SpQjinifdNZq+iHVt8toZBZZ02H3unbn8td0rIifoj4oVpLhvnOAVjUn5tZeUX17
|
||||||
1f4mY6FY6D1RHpk7GCKkS7ApbIjYkNt7TRYVNUeMoY82g14NWjehWroOi23FOn4U
|
tWMA+yyBpf6w6IFxeYBXFd14WOKEarS05U9B59DjBxNqSm+GzhljHO7vvTKy2xXQ
|
||||||
XPX20mBCRjK0RFLQ26j0rWxHpD3yz0cbY8qx3b9v/Jazlk282IakorxaHVTYN5ap
|
Q7Fa702DZ7jwr4DJnL87bDXfarnYksuawqtKwQbFHAOvxF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|
Jby7JudVoCKs/uY3p9BzSvUCgYAF7Pkn44033T7NqgPHa4ChUDPz+PDiDIiX7Dka
|
||||||
G7qprvqFDykhxFRTyU9Vg60gaoxJutyZUlxU5Ol+Z0KnFUP2nynpJBSZwGE509BK
|
D+0EV8+nU8fanXFNC+HaXxuLT+dVCAH3vLgXTK7xzdFGOTDwPIyCGkoFQaNe2BCW
|
||||||
mexGQiSqhJbL5gAS7L5KbxqZbNAvcwmDJ83lPVnEamKmbj1C7nt0wLa6w96iKdPt
|
6cqZYw8giiFYUieAP+HKVKcujmInPbOHcoq6dKqglvQFExDVD56w5axoL8dW4Eme
|
||||||
nrnFAoGBAKTcZDk/YecmnvRYNB5su5bQLjQZZhdGECvEvVBMyqm87pFUwjuVIkG7
|
H/OGkQKBgHgQeK29Ntz7LcKlXYhQPkmYn+DWAmEq4J6XjjXyCV82HgEMmhIiAKKI
|
||||||
pYs2xLsC58kieI7fbWQ+ZG8ZTIs+bdOkJpGFYOekZAYeTJPep/RIVpskcpfPhEit
|
UURKt4j6c7KSiAhnyITz9JeVRoAFVB3y/tSSc5E+CH3jG/G0YlToW20Itf6o8hwD
|
||||||
AG0SbqXcVZTzY+kRTSttBijUbvYGsHccUSJnvJY65FQC6OZJCDkz
|
XERkPPwsXVoZWR2FcUzcO7Bspm/JvkuaL+4u1fi+eNl7uF7RRaD1
|
||||||
-----END RSA PRIVATE KEY-----
|
-----END RSA PRIVATE KEY-----
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
-----BEGIN PUBLIC KEY-----
|
-----BEGIN PUBLIC KEY-----
|
||||||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAud4kAhXh7dQg9qlhqbwU
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAreEfP/ncA1A5cuxBz7rS
|
||||||
d1wrknf06vrT2Wc72lhag5jMtWSsHWEC817zNOTNkev3q6RYXUO0cm+fcZsO4g3I
|
0Z9DDxdSymLwt2OUSM5WJa+dVB3zSpQjinifdNZq+iHVt8toZBZZ02H3unbn8td0
|
||||||
y4ZbM9s5kXY1jDaM4Mc6JCehO7o11f4mY6FY6D1RHpk7GCKkS7ApbIjYkNt7TRYV
|
rIifoj4oVpLhvnOAVjUn5tZeUX17tWMA+yyBpf6w6IFxeYBXFd14WOKEarS05U9B
|
||||||
NUeMoY82g14NWjehWroOi23FOn4UXPX20mBCRjK0RFLQ26j0rWxHpD3yz0cbY8qx
|
59DjBxNqSm+GzhljHO7vvTKy2xXQQ7Fa702DZ7jwr4DJnL87bDXfarnYksuawqtK
|
||||||
3b9v/Jazlk282IakorxaHVTYN5aplspif3M1Ku36mRVXUVkoYRJl8vjUgicut6vc
|
wQbFHAOvxFj8ghBh1Gshap1abExD4l7QWxFMTCVOkLJmXiqfOi5KuMiaMsSUsCBN
|
||||||
qzrTk14l3quyPKri4Tnps/ZLvWGpd53UvEEevZxJVKVxdtgH0O2UCRVRXSuiG74Z
|
QDE3A5aKvpwLGozsvpGRMy5Tt4SgHC7ZbgerBNe75olOoPDxZf7bBt0+O5A/UjK/
|
||||||
CwIDAQAB
|
HwIDAQAB
|
||||||
-----END PUBLIC KEY-----
|
-----END PUBLIC KEY-----
|
||||||
|
|||||||
@@ -1,22 +1,23 @@
|
|||||||
eyJkYXRhIjoieThyOWZHMjQyMGlMcEFnaS9nOFYxZmNobitoakxWSmszYTRU
|
eyJkYXRhIjoiRGdQZUxTaXFiSEdWNk9qUnRtNlZ0OHcrZTg3ZTdDbWZIdCtK
|
||||||
czhTdTZ0VG80akFLdXhNM1NQbGJMNi92XG4yRFNQcXJBQWltRE1vVnNmSkJu
|
UnZVMVAyV0wrK3I4OUZ5VjNqWGk3aEFrXG5uTElTdlJUWUFPMjZDUi9JWEsv
|
||||||
ZG9uUVA5WHByRlJ1NlhHQndBK3p3eDB2b01hNURLNlVaS3hYUDN5QnFcbnda
|
L29FeFJuYUZmYlkxUXc0TnpoWVl5VjN3bjlIdVA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