Fetching properties based on client's profile - spring-cloud

How to fetch properties that is based on client's profile.
For example, If Client enable spring.profiles.active=dev, Service should fetch properties from clien-dev.properties

If you rename your file to application-dev.properties, this should work out of the box.
More Info: http://cloud.spring.io/spring-cloud-static/Brixton.SR6/#_quick_start

Related

How to send Session ID parameter out FROM Moodle?

I need to send user-specific values to an external system from Moodle. How can I force Moodle to send the session ID (or user ID, activity ID, etc.) to this third-party system? All of the articles out there seem to be written for calling into Moodle but this is not what I need to do.
Important:
I cannot alter the Moodle installation. The solution must only involve editing content. This means I cannot author a new plugin or alter any of the Moodle source code.
Edit:
I do have direct access to the Moodle database from a separate external API. The goal was to use this connection to validate the incoming parameters. However, I still need to be able to construct a parameterized URL to call out the external app. That app would then be able to validate the supplied values against the database. If the session ID is not available then I would need the values regarding the page, user, module, etc. to be sent via the parameterized URL.
For the session id do you mean the current user session? There is a session key stored in $_SESSION['USER']->sesskey but its not really useful data. It expires when a user logs out.
$_SESSION is server side, so you would need to use PHP code which isn't allowed in content for security reasons.
Have you got access to the database? You could pull user id and activity id from there. Otherwise you will need to use an API or a plugin.
EDIT: There is a URL activity that you could use to send data externally. But that would require the user to click the link.
Data includes user and course ids.
https://docs.moodle.org/311/en/URL_resource_settings
I can't think of any solution to send data externally without writing some PHP code or adding a plugin.
You can add javascript to every page via Site administration > Appearance > Additional HTML but the session variables aren't available without PHP.
https://docs.moodle.org/311/en/Header_and_footer

How to add attribute to client in keycloak

I want to store a string in the client context (same like user attribute) so that I can retrieve it using client REST API but i want to store it via console. How can i add this new field in client?
By customizing the client-detail.html template
https://keycloak.discourse.group/t/add-field-in-client-settings/7861

Capture IDP User attributes in SAP cloud foundry app via SDK UserAccesor API

I wanted to capture user attributes coming from SAP IDP(Identity & Authentication tenant service like department,salutation ,company etc ,via UserAccessor SDK api,but although those attributes are set and has value in IDP user and all the integration with IDP and sub account is in place post authentication ,user attributes object is empty ,i am only able to retrieve specific attributes like first names ,last name,email address ,user groups etc via JWT and UserAccessor api ,but no luck with other attributes ,in IDP i have mentioned these attributes as well under assertion attributes in SAP Identity authentication tenant .
Please guide and help in this matter .
Thanks Siddharth
Update: As we have now identified the problem, I will update my answer to reflect that. The original answer below is outdated:
Okay so the problem is that you haven't mapped any additional user attributes from your Identity Provider (IdP) to your JWT. As far as I'm aware there are three things you will need to do:
You need to create attributes in your xs-security.json (the file you used to configure your XSUAA service instance). This documentation should explain how to do that.
You need to configure which attributes are exposed by your IdP (in your case the SAP Identity & Authentication service. This documentation looks like a good place to start looking).
You need to map the attributes exposed by your IdP to the attributes defined in your xs-security.json. You will probably need to reconfigure (i.e. delete, recreate and rebind) your XSUAA service instance with the updated config, before you can do this step. Then, navigate to your application in the Cloud Platform Cockpit, from the left toolbar click "Security > Roles" and create your mapping.
Let me know if this works for you!
Original Answer:
As far as I'm aware the default IdP does not support SAML. Without SAML, I'm not sure whether you can propagate any attributes from your IdP into the JWT.
Please also check out this discussion for more information.

How can I remove SID form URL in magento 2.1.7

I have made all setting from magneto backend that is "Session Validation Settings ->Use SID on Storefront :no", clear all cache also. But still not able to remove SID from URL.
It's showing like this:
https://www.exapmle.com/?SID=fpej05jr1fhoi3p083m72fj062
How to remove the SID?
I think you have not selected store or storeview.
and follow bellow step.
Go to the Store > Configuration > General > Web > Session Validation Settings > Use SID on Storefront and set its value to No
Or
Isn't ?SID automatically added by PHP if PHP is configured to not store sessions on the server or the browser doesn't accept cookies?
Note:
The SID is a "session ID". Magento uses this to track a user's activity within the same Magento installation. Normally, Magento powers one website and one store from one installation (database).
Magento could power multiple websites with multiple stores from one installation though. The SID allows users to stay logged in while navigating across these websites/stores.
I think if you have the function enabled, the SID is sent when accessing catalog URLs so Magento can update the session with the user's location/state for the current website/store.
If you're not running a multi-website or multi-store environment, it's safe to disable the SID on the frontend.

How to use RESTful Geoserver?

I'd like to use REST protocol with Geoserver running on a web, but when I enter username and password used to log into web interface, I get HTTP ERROR: 401 Full authentication is required to access this resource. Do I need to create separate user with some privileges? May it be webhosting related issue?
Update: I'm able to access existing workspace with web browser, but using QGIS to create new workspace I end up with error mentioned above.
Thank you.
Well I know this is a little late but I will answer it so that hopefully other people with this issue may find it helpful.
The REST process has its own security configuration that needs to be setup in addition to the web interface user. These are different configurations and are setup in different spots. The REST configuration does use that same users you have configured in the web interface it just doesn't use the access rules that you would have set up.
To setup the permissions you need to edit a file in the directory [Geoserver_data}/security called rest.properties.
Please see here and here on what entires to add and edit in this file to provide access to the rest services.