mirror of
https://github.com/jakeswenson/BitBetter.git
synced 2025-12-19 12:46:19 +00:00
Compare commits
4 Commits
lite
...
3c703f517d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c703f517d | ||
|
|
b93c9487eb | ||
|
|
e173c06320 | ||
|
|
80c0808e72 |
2
build.sh
2
build.sh
@@ -13,7 +13,7 @@ echo "Building BitBetter for BitWarden version $BW_VERSION"
|
|||||||
|
|
||||||
cp "$DIR/.keys/cert.cert" "$DIR/src/bitBetter/.keys"
|
cp "$DIR/.keys/cert.cert" "$DIR/src/bitBetter/.keys"
|
||||||
|
|
||||||
docker run --rm -v "$DIR/src/bitBetter:/bitBetter" -w=/bitBetter mcr.microsoft.com/dotnet/sdk:6.0 sh build.sh
|
docker run --rm -v "$DIR/src/bitBetter:/bitBetter" -w=/bitBetter mcr.microsoft.com/dotnet/sdk:8.0 sh build.sh
|
||||||
|
|
||||||
docker build --no-cache --build-arg BITWARDEN_TAG=bitwarden/api:$BW_VERSION --label com.bitwarden.product="bitbetter" -t bitbetter/api "$DIR/src/bitBetter" # --squash
|
docker build --no-cache --build-arg BITWARDEN_TAG=bitwarden/api:$BW_VERSION --label com.bitwarden.product="bitbetter" -t bitbetter/api "$DIR/src/bitBetter" # --squash
|
||||||
docker build --no-cache --build-arg BITWARDEN_TAG=bitwarden/identity:$BW_VERSION --label com.bitwarden.product="bitbetter" -t bitbetter/identity "$DIR/src/bitBetter" # --squash
|
docker build --no-cache --build-arg BITWARDEN_TAG=bitwarden/identity:$BW_VERSION --label com.bitwarden.product="bitbetter" -t bitbetter/identity "$DIR/src/bitBetter" # --squash
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
ARG BITWARDEN_TAG
|
ARG BITWARDEN_TAG
|
||||||
FROM ${BITWARDEN_TAG}
|
FROM ${BITWARDEN_TAG}
|
||||||
|
|
||||||
COPY bin/Debug/netcoreapp6.0/publish/* /bitBetter/
|
COPY bin/Release/netcoreapp8.0/publish/* /bitBetter/
|
||||||
COPY ./.keys/cert.cert /newLicensing.cer
|
COPY ./.keys/cert.cert /newLicensing.cer
|
||||||
|
|
||||||
RUN set -e; set -x; \
|
RUN set -e; set -x; \
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp6.0</TargetFramework>
|
<TargetFramework>netcoreapp8.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 as build
|
FROM mcr.microsoft.com/dotnet/sdk:8.0 as build
|
||||||
|
|
||||||
WORKDIR /licenseGen
|
WORKDIR /licenseGen
|
||||||
|
|
||||||
@@ -12,6 +12,6 @@ RUN set -e; set -x; \
|
|||||||
|
|
||||||
FROM bitbetter/api
|
FROM bitbetter/api
|
||||||
|
|
||||||
COPY --from=build /licenseGen/bin/Debug/netcoreapp6.0/publish/* /app/
|
COPY --from=build /licenseGen/bin/Release/netcoreapp8.0/publish/* /app/
|
||||||
|
|
||||||
ENTRYPOINT [ "dotnet", "/app/licenseGen.dll", "--core", "/app/Core.dll", "--cert", "/cert.pfx" ]
|
ENTRYPOINT [ "dotnet", "/app/licenseGen.dll", "--core", "/app/Core.dll", "--cert", "/cert.pfx" ]
|
||||||
|
|||||||
@@ -414,14 +414,14 @@ namespace bitwardenSelfLicensor
|
|||||||
set("BillingEmail", email);
|
set("BillingEmail", email);
|
||||||
set("BusinessName", string.IsNullOrWhiteSpace(businessName) ? "BitBetter" : businessName);
|
set("BusinessName", string.IsNullOrWhiteSpace(businessName) ? "BitBetter" : businessName);
|
||||||
set("Enabled", true);
|
set("Enabled", true);
|
||||||
set("Plan", "Custom");
|
set("Plan", "Enterprise (Annually)");
|
||||||
set("PlanType", Enum.Parse(planTypeEnum, "Custom"));
|
set("PlanType", Enum.Parse(planTypeEnum, "EnterpriseAnnually"));
|
||||||
set("Seats", (int)short.MaxValue);
|
set("Seats", int.MaxValue);
|
||||||
set("MaxCollections", short.MaxValue);
|
set("MaxCollections", short.MaxValue);
|
||||||
set("UsePolicies", true);
|
set("UsePolicies", true);
|
||||||
set("UseSso", true);
|
set("UseSso", true);
|
||||||
set("UseKeyConnector", true);
|
set("UseKeyConnector", true);
|
||||||
//set("UseScim", true); // available in version 10, which is not released yet
|
set("UseScim", true);
|
||||||
set("UseGroups", true);
|
set("UseGroups", true);
|
||||||
set("UseEvents", true);
|
set("UseEvents", true);
|
||||||
set("UseDirectory", true);
|
set("UseDirectory", true);
|
||||||
@@ -429,15 +429,21 @@ namespace bitwardenSelfLicensor
|
|||||||
set("Use2fa", true);
|
set("Use2fa", true);
|
||||||
set("UseApi", true);
|
set("UseApi", true);
|
||||||
set("UseResetPassword", true);
|
set("UseResetPassword", true);
|
||||||
|
set("UseCustomPermissions", true);
|
||||||
set("MaxStorageGb", storage == 0 ? short.MaxValue : storage);
|
set("MaxStorageGb", storage == 0 ? short.MaxValue : storage);
|
||||||
set("SelfHost", true);
|
set("SelfHost", true);
|
||||||
set("UsersGetPremium", true);
|
set("UsersGetPremium", true);
|
||||||
set("Version", 9);
|
set("UsePasswordManager", true);
|
||||||
|
set("UseSecretsManager", true);
|
||||||
|
set("SmSeats", int.MaxValue);
|
||||||
|
set("SmServiceAccounts", int.MaxValue);
|
||||||
|
set("Version", 14); //This is set to 14 to use LimitCollectionCreationDeletion can be changed to 13 to just use Secrets Manager
|
||||||
set("Issued", DateTime.UtcNow);
|
set("Issued", DateTime.UtcNow);
|
||||||
set("Refresh", DateTime.UtcNow.AddYears(100).AddMonths(-1));
|
set("Refresh", DateTime.UtcNow.AddYears(100).AddMonths(-1));
|
||||||
set("Expires", DateTime.UtcNow.AddYears(100));
|
set("Expires", DateTime.UtcNow.AddYears(100));
|
||||||
set("Trial", false);
|
set("Trial", false);
|
||||||
set("LicenseType", Enum.Parse(licenseTypeEnum, "Organization"));
|
set("LicenseType", Enum.Parse(licenseTypeEnum, "Organization"));
|
||||||
|
set("LimitCollectionCreationDeletion", true); //This will be used in the new version of BitWarden but can be applied now
|
||||||
|
|
||||||
set("Hash", Convert.ToBase64String((byte[])type.GetMethod("ComputeHash").Invoke(license, new object[0])));
|
set("Hash", Convert.ToBase64String((byte[])type.GetMethod("ComputeHash").Invoke(license, new object[0])));
|
||||||
set("Signature", Convert.ToBase64String((byte[])type.GetMethod("Sign").Invoke(license, new object[] { cert })));
|
set("Signature", Convert.ToBase64String((byte[])type.GetMethod("Sign").Invoke(license, new object[] { cert })));
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp6.0</TargetFramework>
|
<TargetFramework>netcoreapp8.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user