Setup Apereo Cas Management integrated with CAS server - single-sign-on

I want to install Apero Cas Management (verison 6.0) and integrate it with Cas Server (version 6.0).
I have installed following these step:
Step 1: I installed Cas Server
I checked it with REST API. It worked.
My server stays at http://203.162.141.7:8080
And this is configuration of my Cas server. I put this config at /etc/cas/config. Here is my file cas.properties file
cas.server.name=http://203.162.141.7:8080
cas.server.prefix=${cas.server.name}/cas
logging.config: file:/etc/cas/config/log4j2.xml
server.port=8080
server.ssl.enabled=false
cas.serviceRegistry.initFromJson=false
cas.serviceRegistry.json.location=file:/etc/cas/services-repo
cas.authn.oauth.grants.resourceOwner.requireServiceHeader=true
cas.authn.oauth.userProfileViewType=NESTED
cas.authn.policy.requiredHandlerAuthenticationPolicyEnabled=false
cas.authn.attributeRepository.stub.attributes.email=casuser#example.org
#REST API JSON
cas.rest.attributeName=email
cas.rest.attributeValue=.+example.*
Step 2: I installed Cas-management-overlay
I put my cas-management-overlay's config file a /etc/cas/config too. Here is my management.properties file
cas.server.name=http://203.162.141.7:8080
cas.server.prefix=${cas.server.name}/cas
mgmt.serverName=http://203.162.141.7:8088
mgmt.adminRoles[0]=ROLE_ADMIN
mgmt.userPropertiesFile=file:/etc/cas/config/users.json
server.port=8088
server.ssl.enabled=false
logging.config=file:/etc/cas/config/log4j2-management.xml
And my here is users.json file
{
"casuser" : {
"#class" : "org.apereo.cas.mgmt.authz.json.UserAuthorizationDefinition",
"roles" : [ "ROLE_ADMIN" ]
}
}
Then I run ./build.sh, and it shows me that
Finally, I access this link to open cas-management http://203.162.141.7:8088/cas-management, but the it redirects to this url http://203.162.141.7:8080/cas/login?service=http%3A%2F%2F203.162.141.7%3A8088%2Fcas-management%2F and shows this error below
I don't know where I have gone wrong.

I think since you haven't told the management webapp about the location of the service registry, it can't add itself as a registered service.
Manually add a registered service for http://203.162.141.7:8088/cas-management and you should be able to log in to the management app at that point.

Here is my answer for cas-management register file name /etc/cas/services-repo/casManagement-1.json
{
"#class" : "org.apereo.cas.services.RegexRegisteredService",
"serviceId":"^https://domain:8088/cas-management.+",
"name" : "casManagement",
"id" : 1,
"evaluationOrder" : 1,
"allowedAttributes":["cn","mail"]
}

Related

Print editions using metaboss on Solana

I'm trying to create prints from a master edition (aka original edition) using from the console. The number of prints should be limited to a fixed number.
I followed this procedure :
Upload the image to Arweave : arloader upload image.jpg --with-sol --sol-keypair-path ~/.config/solana/id.json --ar-default-keypair --no-bundle.
Create the json file with NFT metadata :
{
"name": "name_of__the_collection",
"symbol": "token_of_the_collection",
"uri": "https://arweave.net/[arweave_img_tx_id]",
"seller_fee_basis_points": 0,
"creators": [
{
"address": "address_of_the_creator_of_the_collection",
"verified": false,
"share": 100
}
]
}
Mint the NFT :
metaboss mint one --keypair ~/.config/solana/id.json --nft-data-file ./metadata.json --max-editions='10'
Create the all the prints :
metaboss mint missing-editions --account address_of_the_creator_of_the_collection
I have two issues :
On solana explorer, I have an error : error loading image
The 4. command returns an error : Error: failed to get account data
What's wrong ?
[edit] Error 1 : I used uri key instead of the image in the metadata. That's why solana explorer couldn't find the image.
Generally the process is good. There are some details that have to be aligned though:
Regarding the missing image:
You have to upload the metadata JSON file, too. This is what you reference in the mint command.
Your metadata is not 100% valid. E.g. you are missing the properties field. Have a look into the Token Metadata docs for more details.
Regarding metaboss mint missing-editions:
The Account you specify with --account should not be the address of the creator of the collection but instead the Master Edition Address. (Master Edition is the NFT you minted in step 3)
Since the command runs a GPA call you should add --timeout 120 and use not use the default RPC. Otherwise you will not get results.
If it still does not work you can also run
metaboss mint editions --next-editions 9
Please let me know in case of any uncertainties.

Can anyone help me with this error code in Data Fusion

I'm having a go at creating my first data fusion pipeline.
The data is going from Google Cloud Storage csv file to Big Query.
I have created the pipeline and carried out a preview run which was successful but after deployment trying to run resulted in error.
I pretty much accepted all the default settings apart from obviously configuring my source and destination.
Error from Log ...
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403
Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "Required 'compute.firewalls.list' permission for
'projects/xxxxxxxxxxx'",
"reason" : "forbidden"
} ],
"message" : "Required 'compute.firewalls.list' permission for
'projects/xxxxxxxxxx'"
}
After deployment run fails
Do note that as a part of creating an instance, you must set up permissions [0]. The role "Cloud Data Fusion API Service Agent" must be granted to the exact service account, as specified in that document, which has an email address that begins with "cloud-datafusion-management-sa#...".
Doing so should resolve your issue.
[0] : https://cloud.google.com/data-fusion/docs/how-to/create-instance#setting_up_permissions

Latency timeout using CosmosDB from Android Xamarin

I am developing an app using Xamarin using Visual Studio for Mac.
I am writing C# to target both iOS and Android.
We are also using CosmosDB on Microsoft Azure.
The problem comes about when trying to get Android to access CosmosDB. Please note that I am using the Mongo API for Cosmos.
The error message I get in Android is as follows:
A timeout occured after 30000ms selecting a server using
CompositeServerSelector{ Selectors = ReadPreferenceServerSelector{
ReadPreference = { Mode : Primary } }, LatencyLimitingServerSelector{
AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster
state is { ClusterId : "2", ConnectionMode : "ReplicaSet", Type :
"ReplicaSet", State : "Disconnected", Servers : [{ ServerId: "{
ClusterId : 2, EndPoint :
"Unspecified/aspire-cosmosdb.documents.azure.com:10255" }", EndPoint:
"Unspecified/aspire-cosmosdb.documents.azure.com:10255", State:
"Disconnected", Type: "Unknown" }] }.
This is my code:
using System;
using System.Diagnostics;
using System.Threading.Tasks;
using MongoDB.Driver;
string dsn = "mongodb://myusername:mypassword#mycosmosname.documents.azure.com:10255/?ssl=true&replicaSet=globaldb";
string databaseName = "mydatabasename";
Debug.WriteLine("Initializing Cosmos DB!");
MongoClientSettings settings = MongoClientSettings.FromUrl(new MongoUrl(dsn));
settings.SslSettings = new SslSettings() { EnabledSslProtocols = SslProtocols.Tls12 };
var mongoClient = new MongoClient(settings);
var db = mongoClient.GetDatabase(databaseName);
var databases = (await mongoClient.ListDatabasesAsync()).ToList();
foreach (var d in databases)
{
Debug.WriteLine(d.AsBsonDocument);
}
This works 100% fine on xamarin.ios. Connects everytime. The code is pretty much copy and paste from the CosmosDB Quick start on the Azure Portal. I have also taken this code and put it in a C# Console app and it ALSO works. However, same code doesn't work on Android. Why?
I've tried this both on the Android simulator and a real Android device and both times get this 30 second timeout. I've also enabled the Internet permission on Android, but no joy. Please help!
I've referenced the latest packages via Nuget at the time of writing:
MongoDB.Driver -2.4.4
MongoDB.Driver.Core - 2.4.4
MongoDB.Bson - 2.4.4
Note: I have obfuscated the personal details from the dsn but it should show you the rough format of it. The actual dsn is a direct copy and paste of the cosmosdb dsn connection string from the Azure portal.
Okay so after a LOT of headbanging, the solution is fairly simple.
CosmosDB ONLY supports TLS 1.2.
Go into your Droid project settings (Right click on project > Options) and go to Android Build > SSL/TLS Implementation.
Mine was set to 'default'. I guess 'default' at the time of writing does not support TLS 1.2. At least not on Xamarin for the Mac anyway. This is quite a gotcha. Switch it over to Native TLS 1.2+ and magically it just works! Now able to connect to CosmosDB via Android.

XS Project Share SAP HANA cannot see in browser

I have project with XS project, I already shared to HANA packages but failed when show to browser, the error show:
404 - Not found
We could not find the resource you're trying to access.
It might be misspelled or currently unavailable.
My .xsaccess:
{
"exposed" : true,
"authentication" : [{"method":"Basic"}],
"cache_control" : "no-cache, no-store",
"cors" : {
"enabled" : false
}
}
.xsapp:
{}
xsprivileges:
{
"privileges" : [
{ "name" : "ProfileOwner", "description" : "Profile Ownership" }
]
}
and one question, is it possible the problem because the role user or privileges user, about authorization? How to fix this issue? thanks
The .xsapp should be a empty file with no content in it. The exposed parameter in the .xsaccess should be enough to expose your project. Make sure that all files are activated in the HANA repository.
If the error was authorization specific you would get a 503 error. If the 404 error is a XSEngine page, either your code isn't activated or the package path is incorrect.

Magento2 composer install fails due to magento/module-worldpay

Getting the following error when trying to composer install community edition v2.1.0:
Installing magento/module-worldpay (100.0.5)
Downloading: Connecting...
[Composer\Downloader\TransportException]
Invalid credentials for 'https://repo.magento.com/archives/magento/module/worldpay/magento-module-worldpay-100.0.5.0.zip', aborting.
The Magento 2 GitHub repository requires you to authenticate. The composer install commands fails if you do not. To authenticate, generate authentication keys, after which you create an auth.json file in the home directory of the Magento file system owner
For example, if your user name is magento_user, create or edit /home/magento_user/.composer/auth.json
{
"github-oauth": {
"github.com": "<your github oauth id>"
},
"http-basic": {
"repo.magento.com": {
"username": "<public key>",
"password": "<private key>"
}
}
}
Find the detailed instructions here
You need to create API keys in order to download the magento2 modules.
Go to magentocommerce.com
In My Account > Developers > Secure Keys, generate new ones.
Let composer create/update the auth.json file for you
Execute:
composer global config http-basic.repo.magento.com YOUR_PUBLIC_KEY YOUR_PRIVATE_KEY