Coder Social home page Coder Social logo

indice-co / indice.platform Goto Github PK

View Code? Open in Web Editor NEW
45.0 45.0 7.0 56.3 MB

Indice Platform addons and featues

License: MIT License

C# 58.83% JavaScript 0.22% TypeScript 27.10% HTML 10.61% SCSS 2.20% Dockerfile 0.01% Batchfile 0.01% Shell 0.05% PowerShell 0.02% CSS 0.97%

indice.platform's People

Contributors

ar-is avatar christosasvestopoulos avatar cleftheris avatar costaarg avatar dependabot[bot] avatar dimkormpos avatar dkarkanas avatar eskour avatar fotistsinopoulos avatar giorgos07 avatar hermeskr avatar lefterisrentas avatar nikosdevphp avatar nzervo avatar panoukos41 avatar pt4r avatar pthanos avatar sorras-panagiotis avatar travlos avatar vaggelanos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

indice.platform's Issues

[Admin UI] http call "PUT /api/clients/<clientId>/urls" receives 405 Method Not Allowed!

Dear Indice Development Team,

The http call "PUT /api/clients/{clientId}/urls" from AdminUI receives 405 Method Not Allowed! (Please note, that we are not using the minimal API version of Identity Server)

Code from identity-api.service.ts:

    /**
     * Renews the list of client urls (redirect cors etc).
     * @return No Content
     */
    updateClientUrls(clientId: string, body: UpdateClientUrls): Observable<void> {
        let url_ = this.baseUrl + "/api/clients/{clientId}/urls";
        if (clientId === undefined || clientId === null)
            throw new Error("The parameter 'clientId' must be defined.");
        url_ = url_.replace("{clientId}", encodeURIComponent("" + clientId));
        url_ = url_.replace(/[?&]$/, "");

        const content_ = JSON.stringify(body);

        let options_ : any = {
            body: content_,
            observe: "response",
            responseType: "blob",
            headers: new HttpHeaders({
                "Content-Type": "application/json",
            })
        };

        return this.http.request("put", url_, options_).pipe(_observableMergeMap((response_ : any) => {
            return this.processUpdateClientUrls(response_);
        })).pipe(_observableCatch((response_: any) => {
            if (response_ instanceof HttpResponseBase) {
                try {
                    return this.processUpdateClientUrls(response_ as any);
                } catch (e) {
                    return _observableThrow(e) as any as Observable<void>;
                }
            } else
                return _observableThrow(response_) as any as Observable<void>;
        }));
    }

But, notice that, the aforementioned endpoint only accepts POST http calls (ClientsController.cs in Indice.AspNetCore.Identity):

    /// <summary>Renews the list of </summary>
    /// <param name="clientId">The id of the client.</param>
    /// <param name="request"></param>
    /// <response code="204">No Content</response>
    /// <response code="404">Not Found</response>
    [Authorize(AuthenticationSchemes = IdentityServerApi.AuthenticationScheme, Policy = IdentityServerApi.Policies.BeClientsWriter)]
    [CacheResourceFilter(DependentPaths = new string[] { "{clientId}" })]
    [Consumes(MediaTypeNames.Application.Json)]
    [HttpPost("{clientId}/urls")]
    [Produces(MediaTypeNames.Application.Json)]
    [ProducesResponseType(statusCode: StatusCodes.Status204NoContent, type: typeof(void))]
    [ProducesResponseType(statusCode: StatusCodes.Status404NotFound, type: typeof(ProblemDetails))]
    public async Task<IActionResult> UpdateClientUrls([FromRoute] string clientId, [FromBody] UpdateClientUrls request) {

In minimal API, it all seems OK:

    group.MapPut("{clientId}/urls", ClientHandlers.UpdateClientUrls)
         .WithName(nameof(ClientHandlers.UpdateClientUrls))
         .WithSummary("Renews the list of client urls (redirect cors etc).")
         .RequireAuthorization(IdentityEndpoints.Policies.BeClientsWriter)
         .InvalidateCache(nameof(ClientHandlers.GetClient))
         .WithParameterValidation<UpdateClientUrls>();

CasesUI project set scopes accordingly

When consuming from nuget the clients sentsphone scope even if we do not declare it from the SpaOptions.

This is not a valid scope for cases-api resource.

Admin UI roles management

AdminUIAdministrator, AdminUIUserReader, AdminUIUserWriter, AdminUIClientReader, AdminUIClientWriter are the role names to use.

CountryInfo.Countries has a dublicate value for Montenegro

Add sequential ticket number for cases

Requirements

  • example 000123
  • numbers cannot be referenced to public apis (easy to guess, etc)
  • feature will be optional and by default off

My endpoints

  • expose to list/details
  • make it searchable

Manage endpoints

  • add column to cases list
  • add to case details
  • make it searchable

Create Navigation Property for "current checkpoint"

  • Αντίστοιχο με το Public Checkpoint.
  • Αλλαγή σε όλα τα queries που κάνουμε OrderBy + FirstOrDefault ωστε να παίζει με FK
  • Migration script για ορισμό latest checkpoint

Dashboard diagrams

Create new gauge diagrams on dashboard page:

  • Active users (percentage of users that have log in into the system - daily/weekly/monthly)
  • From active users display clients used
  • Percent of verified emails/total users
  • Percent of verified phone numbers/total users
  • Total number of locked out/expired password users
  • Percent of user that have the default password policy (donut chart)

CasesManagement add PostgreSQL support

After testing the following have been found and need to be fixed/researched so that the cases management system can run using PostgreSQL engine.

  1. The implementation of the json columns uses MsSql fucntions by default. This needs to be configurable.
  2. The AddWorkflow extension method allows for a delegate to configure the Elsa efcore dbcontext giving the ability to use other engines for Elsa as well.

Other checks that need to be made

  1. Make sure the efcore context doesn't use other MsSql specific features.

Remove CaseTypeCode prefix from CheckpointType Codes

  • Αυτή τη στιγμή έχουμε Certification.LoanPayoffBalance:Rejected αλλά θέλουμε να χρησιμοποιούμε μόνο το Rejected.
  • Υπαρχει θεμα με τα queries αυτη τη στιγμη και κανουμε client-side where για να φιλτράρουμε με το Rejected

Create onboarding API

Create public register endpoint - if system client allow all claims (same applies on update claim endpoint) - add setting to respond with not found if disabled

Exception while using smsService and emailService sequentially

While trying to use smsService and emailService sequentially in an event handler we are getting the following error: System.ObjectDisposedException: 'Cannot access a disposed object.'

The weird thing about this behavior is that if emailService related code precedes smsService, the exception won't be thrown!

Code Snippet:

using System;
using System.Threading.Tasks;
using Indice.AspNetCore.Identity;
using Indice.AspNetCore.Identity.Api.Events;
using Indice.Services;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;

namespace ChaniaBank.Identity.Events
{
    public class PasswordChangedEventHandler : IIdentityServerApiEventHandler<PasswordChangedEvent>
    {
        private readonly ILogger<PasswordChangedEventHandler> _logger;
        private readonly ISmsService _smsService;
        private readonly IEmailService _emailService;
        private readonly IStringLocalizer<PasswordChangedEventHandler> _localizer;

        /// <summary>
        /// Creates a new instance of <see cref="PasswordChangedEventHandler"/>.
        /// </summary>
        public PasswordChangedEventHandler(
            ILogger<PasswordChangedEventHandler> logger,
            ISmsService smsService,
            IEmailService emailService,
            IStringLocalizer<PasswordChangedEventHandler> localizer
            ) {
            _logger = logger ?? throw new ArgumentNullException(nameof(logger));
            _smsService = smsService ?? throw new ArgumentNullException(nameof(smsService));
            _emailService = emailService ?? throw new ArgumentNullException(nameof(emailService));
            _localizer = localizer ?? throw new ArgumentNullException(nameof(localizer));
        }

        /// <summary>
        /// Handle password changed event.
        /// </summary>
        /// <param name="event">Password changed event info.</param>
        public async Task Handle(PasswordChangedEvent @event) {
            _logger.LogDebug($"Password changed: {@event}");


            if (@event.User.PhoneNumberConfirmed) {
                await _smsService.SendAsync(@event.User.PhoneNumber, _localizer["Password Change"], _localizer["YOUR PASSWORD HAS BEEN CHANGED."] + " " + DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"));
            }
            // inform user that his/her password has been changed
            if (@event.User.EmailConfirmed) {
                var emailBody = GetEmailBody();
                await _emailService.SendAsync(message =>
                message.To(@event.User.Email)
                .WithSubject(_localizer["Password Change"])
                .WithBody(emailBody));
            }

        }

        private string GetEmailBody() {
            return $@"
                <p>{_localizer["Dear customer"]},</p>
                <p></p>
                {_localizer["YOUR PASSWORD HAS BEEN CHANGED."]} {DateTime.Now:dd/MM/yyyy HH:mm:ss}
                <p>{_localizer["The Cooperative Bank of Chania will never ask in any way (via email, phone, SMS or any other way) for you to reveal any personal information such as account details, card numbers and PINs, sign-in details to our eBanking service (username and password)."]}</p>
                <p>{_localizer["For more information regarding security, please visit the \"useful advice for online transactions\" section on our Bank's webpage."]}</p>
                <p>{_localizer["For any issues or questions regarding the use of our eBanking service feel free to get in touch with any of our representatives by visiting one of our Bank branches (work days between 08:00-14:00) or you can send us your enquiry by e-mail to [email protected] and we’ll get in touch with you as soon as possible."]}</p>
            ";
        }
    }
}

/api/account/validate-password does not take into account the request.userName

When there is no available user (e.g. the user is registering) the /api/account/validate-password endpoint does not take into account the userName from the request payload.

image

Therefore irrespectively of the MaxAllowedUserNameSubset the password rule always returns valid.

Expected behavior:
When there is no user, the user instance that gets created needs to have the userName initialized from the request value.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.